fix for possible out of bounds read, printing a warning with pointcache header.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 09:19:03 +0000 (09:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Jul 2013 09:19:03 +0000 (09:19 +0000)
source/blender/blenkernel/intern/pointcache.c

index 33752e81c55e2cd527c5fe30715947e863757f22..41b9734315d1dde65ade0ab7cf718a7afb7f5954 100644 (file)
@@ -928,7 +928,7 @@ static int ptcache_dynamicpaint_read(PTCacheFile *pf, void *dp_v)
        /* version header */
        ptcache_file_read(pf, version, 1, sizeof(char) * 4);
        if (strncmp(version, DPAINT_CACHE_VERSION, 4)) {
-               printf("Dynamic Paint: Invalid cache version: %s!\n", version);
+               printf("Dynamic Paint: Invalid cache version: '%c%c%c%c'!\n", UNPACK4(version));
                return 0;
        }