diff utils.c @ 643:253b5292946a libavformat

various security fixes and precautionary checks
author michael
date Wed, 12 Jan 2005 00:16:25 +0000
parents 0b52743104ac
children 6a5ba24b2c6b
line wrap: on
line diff
--- a/utils.c	Tue Jan 11 08:16:04 2005 +0000
+++ b/utils.c	Wed Jan 12 00:16:25 2005 +0000
@@ -57,7 +57,7 @@
         p = extensions;
         for(;;) {
             q = ext1;
-            while (*p != '\0' && *p != ',') 
+            while (*p != '\0' && *p != ',' && q-ext1<sizeof(ext1)-1) 
                 *q++ = *p++;
             *q = '\0';
             if (!strcasecmp(ext1, ext))