[MPlayer-cvslog] r38664 - trunk/asxparser.c
ib
subversion at mplayerhq.hu
Tue Oct 1 15:43:32 EEST 2024
Author: ib
Date: Tue Oct 1 15:43:31 2024
New Revision: 38664
Log:
Check the return value of malloc() to avoid a NULL pointer dereference.
This fixes https://bugs.debian.org/1083029 and closes Trac #2426.
Modified:
trunk/asxparser.c
Modified: trunk/asxparser.c
==============================================================================
--- trunk/asxparser.c Tue Oct 1 11:42:31 2024 (r38663)
+++ trunk/asxparser.c Tue Oct 1 15:43:31 2024 (r38664)
@@ -118,6 +118,7 @@ asx_parse_attribs(ASX_Parser_t* parser,c
}
}
attrib = malloc(ptr2-ptr1+2);
+ if(!attrib) return -1;
strncpy(attrib,ptr1,ptr2-ptr1+1);
attrib[ptr2-ptr1+1] = '\0';
More information about the MPlayer-cvslog
mailing list