draw: add badrect() function to reject zero, negative size or orverly huge rectangles

not checking the rectangle dimensions causes integer overflows
and memory corruption. adding a new badrect() function that checks
for these cases.
This commit is contained in:
cinap_lenrek 2013-06-16 19:01:46 +02:00
parent e36d9f5c4e
commit 202be57bb9
10 changed files with 42 additions and 8 deletions

View file

@ -401,6 +401,7 @@ extern int cmap2rgb(int);
extern int cmap2rgba(int);
extern void icossin(int, int*, int*);
extern void icossin2(int, int, int*, int*);
extern int badrect(Rectangle);
/*
* Graphics