]> granicus.if.org Git - php/commitdiff
Fixed possible overflow.
authorIlia Alshanetsky <iliaa@php.net>
Wed, 10 Nov 2004 01:43:04 +0000 (01:43 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 10 Nov 2004 01:43:04 +0000 (01:43 +0000)
ext/exif/exif.c

index aced27d6c7d4daa40773600c5eb76b505811e9c8..034f1fb6357f14dd2f664cf60b954a594564e8e2 100644 (file)
@@ -3776,7 +3776,7 @@ PHP_FUNCTION(exif_read_data)
                        }
                }
                for (i=0; i<SECTION_COUNT; i++) {
-                       sprintf(tmp, ",%s,", exif_get_sectionname(i));
+                       snprintf(tmp, sizeof(tmp), ",%s,", exif_get_sectionname(i));
                        if (strstr(sections_str, tmp)) {
                                sections_needed |= 1<<i;
                        }