I'm writing a program to practice some reverse engineering techniques. Here are the relevant lines of x86 (Intel) assembly code:
mov, eax [ebp - 20]
cdq
idiv ecx
Through my input (a network socket) I can control the bytes that go into eax
and ecx
before these lines of assembly are executed.
My question is: what are the minimum values (positive or negative) that I can use in order to cause division overflow (where division overflow is NOT a "divide by zero" error but where a result is returned that is greater than 32-bits and, therefore, will not fit into eax
(the return register).
Thank you in advance for your help!