Commit Graph
3 Commits
Author SHA1 Message Date
ohnx d2f5cd017c WebPositive: Improve CookieWindow cookie deletion
Fixes Coverity issue CID 1340122.
Also resolves two TODO items in the code: allowing the deletion
of a selection of cookies, and deleting all cookies from a site
when there are no specific cookies selected.

Signed-off-by: Adrien Destugues <[email protected]>
2017-12-24 12:04:21 +01:00
ohnx 3934b3e6cc Add tests for calloc()
Signed-off-by: Augustin Cavalier <[email protected]>
2017-12-17 17:02:47 -05:00
Mason X 8a4744fbe4 Catch integer overflow in calloc (Fixes #13820)
calloc, when multiplying to find the true size of memory desired
by a user, will occasionally overflow if the numbers are too
large. This commit makes calloc ensure that the multiplication
does not overflow by dividing the result by one of the numbers,
and checking to ensure that the result is equal to the other
number. If there is overflow, it is treated as an OOM error.

Signed-off-by: Augustin Cavalier <[email protected]>
2017-12-17 17:02:09 -05:00