From: Christos Zoulas Date: Wed, 7 May 2014 10:13:12 +0000 (+0000) Subject: Fix for uninialized title (Jan Kaluza) X-Git-Tag: FILE5_19~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b51659e225841db5cf0c6dfd76950ffbe4c8cf72;p=file Fix for uninialized title (Jan Kaluza) --- diff --git a/ChangeLog b/ChangeLog index 6873a5fc..77a5218f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-05-06 6:12 Christos Zoulas + + * Fix uninitialized title in CDF files (Jan Kaluza) + 2014-05-04 14:55 Christos Zoulas * PR/351: Fix compilation of empty files diff --git a/src/readcdf.c b/src/readcdf.c index 833cd0c7..4e6e5552 100644 --- a/src/readcdf.c +++ b/src/readcdf.c @@ -26,7 +26,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: readcdf.c,v 1.40 2014/03/06 15:23:33 christos Exp $") +FILE_RCSID("@(#)$File: readcdf.c,v 1.41 2014/05/05 16:11:21 christos Exp $") #endif #include @@ -173,12 +173,11 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, if (info[i].pi_type == CDF_LENGTH32_WSTRING) k++; s = info[i].pi_str.s_buf; - for (j = 0; j < sizeof(vbuf) && len--; - j++, s += k) { + for (j = 0; j < sizeof(vbuf) && len--; s += k) { if (*s == '\0') break; if (isprint((unsigned char)*s)) - vbuf[j] = *s; + vbuf[j++] = *s; } if (j == sizeof(vbuf)) --j;