Added one safety check to AFM parsing.
This commit is contained in:
parent
0fb5457516
commit
a983a719ec
|
@ -60,6 +60,7 @@ static void PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp)
|
|||
while(isspace(*value))
|
||||
value++;
|
||||
cp = endpos = strchr(value, ';');
|
||||
if (!cp) { ERR("missing ;, failed.\n"); return; }
|
||||
while(isspace(*--cp))
|
||||
;
|
||||
memcpy(valbuf, value, cp - value + 1);
|
||||
|
|
Loading…
Reference in New Issue