Added one safety check to AFM parsing.

This commit is contained in:
Marcus Meissner 2001-01-02 20:30:16 +00:00 committed by Alexandre Julliard
parent 0fb5457516
commit a983a719ec
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ static void PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp)
while(isspace(*value)) while(isspace(*value))
value++; value++;
cp = endpos = strchr(value, ';'); cp = endpos = strchr(value, ';');
if (!cp) { ERR("missing ;, failed.\n"); return; }
while(isspace(*--cp)) while(isspace(*--cp))
; ;
memcpy(valbuf, value, cp - value + 1); memcpy(valbuf, value, cp - value + 1);