not checking the rectangle dimensions causes integer overflows and memory corruption. adding a new badrect() function that checks for these cases.