[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] Divison by zero in type 4 functions
From: |
gerel |
Subject: |
[pdf-devel] Divison by zero in type 4 functions |
Date: |
Wed, 04 Feb 2009 01:26:41 -0800 (PST) |
Hi all,
If I understand correctly the following lines (1498 and 1511) from pdf-fp-func.c
aren't considering the case when "stack[sp] == 0".
##
case OPC_div:
if (sp < 1) goto stack_underflow;
stack[sp-1] /= stack[sp];
sp--;
break;
[...]
case OPC_idiv:
if (sp < 1) goto stack_underflow;
if (!INT_P(stack[sp]) || !INT_P(stack[sp-1]))
goto type_error;
stack[sp-1] = INT(stack[sp]) / INT(stack[sp-1]);
sp--;
break;
###
Is that a bug ?
regards,
-gerel
- [pdf-devel] Divison by zero in type 4 functions,
gerel <=