SHA256
1
0
forked from pool/aegisub

Accepting request 676185 from home:lachs0r:branches:multimedia:apps

- Add aegisub-DataBlockCache-Fix-crash-in-cache-invalidation.patch
  Fixes undefined behavior e.g. when scrolling the audio view in
  spectrogram mode.

This patch has been contributed here rather than the official upstream:
https://github.com/TypesettingTools/Aegisub/pull/34

The reason for this is that the single upstream maintainer has neither time nor inclination to review pull requests but also isn’t willing to hand out push access to other contributors. This will likely only happen once these contributors have managed to prepare a new release of Aegisub that works on all platforms.
Hence, most development now happens at the TypesettingTools repository.

OBS-URL: https://build.opensuse.org/request/show/676185
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/aegisub?expand=0&rev=55
This commit is contained in:
Martin Pluskal 2019-02-14 16:49:25 +00:00 committed by Git OBS Bridge
parent afabb19cc7
commit e32a090617
3 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From 7479ffbd6d9cc9bf9786d1f1d9f0e6307198681f Mon Sep 17 00:00:00 2001
From: Martin Herkt <lachs0r@srsfckn.biz>
Date: Thu, 14 Feb 2019 14:52:27 +0100
Subject: [PATCH] DataBlockCache: Fix crash in cache invalidation
Fixes #33
---
src/block_cache.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/block_cache.h b/src/block_cache.h
index 9fcaf42e7..f2ebfa261 100644
--- a/src/block_cache.h
+++ b/src/block_cache.h
@@ -150,8 +150,8 @@ public:
}
// Remove old entries until we're under the max size
- for (auto it = age.rbegin(); size > max_size && it != age.rend(); )
- KillMacroBlock(**it++);
+ for (auto it = age.rbegin(); size > max_size && it != age.rend(); it++)
+ KillMacroBlock(**it);
}
/// @brief Obtain a data block from the cache
--
2.20.1

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Feb 14 16:09:23 UTC 2019 - Martin Herkt <9+suse@cirno.systems>
- Add aegisub-DataBlockCache-Fix-crash-in-cache-invalidation.patch
Fixes undefined behavior e.g. when scrolling the audio view in
spectrogram mode.
-------------------------------------------------------------------
Fri Aug 31 11:55:30 UTC 2018 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package aegisub
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -34,6 +34,8 @@ Patch4: aegisub-no-optimize.patch
Patch5: luabins.patch
#PATCH-FIX-OPENSUSE - davejplater@gmail.com - aegisub-git-version.patch - Create git_version.h which is missing in git.
Patch7: aegisub-git-version.patch
#PATCH-FIX-UPSTREAM - 9@cirno.systems - aegisub-DataBlockCache-Fix-crash-in-cache-invalidation.patch - Fixes undefined behavior e.g. when scrolling the audio view in spectrogram mode.
Patch8: aegisub-DataBlockCache-Fix-crash-in-cache-invalidation.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
@ -71,6 +73,7 @@ effects in the subtitles, apart from just basic timed text.
%patch4 -p1
%patch5 -p1
%patch7
%patch8 -p1
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/version.cpp
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')