From 26325edddc9ff311b2072745780e764ba4976973 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 8 May 2017 17:00:09 +0200 Subject: [PATCH] - fixed Ogg tag validation. --- src/sound/musicformats/music_libsndfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/musicformats/music_libsndfile.cpp b/src/sound/musicformats/music_libsndfile.cpp index bdba19b4a..d14c6b3ad 100644 --- a/src/sound/musicformats/music_libsndfile.cpp +++ b/src/sound/musicformats/music_libsndfile.cpp @@ -130,7 +130,7 @@ void FindLoopTags(FileReader *fr, uint32_t *start, bool *startass, uint32_t *end } c -= 3; int len = c[0] + 256*c[1] + 65536*c[2]; - if (c[3] || len > 1000000 || len <= (eqp - c + 1)) + if (c[3] || len > 1000000 || len < (eqp - c - 3)) { // length looks fishy so retry with the next '=' continue;