You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/libmikmod/files/3.2.0/006_all_CVE-2009-0179.patch

13 lines
446 B

--- loaders/load_xm.c
+++ loaders/load_xm.c
@@ -611,7 +611,8 @@ static BOOL LoadInstruments(void)
nextwav[of.numsmp+u]=next;
next+=s->length;
- if(_mm_eof(modreader)) {
+ /* last instrument is at the end of file in version 0x0104 */
+ if(_mm_eof(modreader) && (mh->version<0x0104 || t<of.numins-1)) {
MikMod_free(nextwav);MikMod_free(wh);
nextwav=NULL;wh=NULL;
_mm_errno = MMERR_LOADING_SAMPLEINFO;