aegisub/aegisub-DataBlockCache-Fix-crash-in-cache-invalidation.patch
Martin Pluskal e32a090617 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
2019-02-14 16:49:25 +00:00

29 lines
798 B
Diff

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