[MPlayer-cvslog] r35977 - trunk/sub/unrar_exec.c
reimar
subversion at mplayerhq.hu
Sat Mar 16 11:32:42 CET 2013
Author: reimar
Date: Sat Mar 16 11:32:42 2013
New Revision: 35977
Log:
Fix a potential integer overflow.
Modified:
trunk/sub/unrar_exec.c
Modified: trunk/sub/unrar_exec.c
==============================================================================
--- trunk/sub/unrar_exec.c Sat Mar 16 11:15:07 2013 (r35976)
+++ trunk/sub/unrar_exec.c Sat Mar 16 11:32:42 2013 (r35977)
@@ -116,6 +116,8 @@ int unrar_exec_get(unsigned char **outpu
*size += bytesread;
if (*size == bufsize) {
char *p;
+ if (bufsize >= 0x7fffffff - ALLOC_INCR)
+ break;
bufsize += ALLOC_INCR;
p = realloc(*output, bufsize);
if (!p)
More information about the MPlayer-cvslog
mailing list