fix for possible out of bounds read, printing a warning with pointcache header.

This commit is contained in:
Campbell Barton
2013-07-27 09:19:03 +00:00
parent f4f90e73e1
commit e2ece45fec

View 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;
}