chiark
/
gitweb
/
~mdw
/
secnet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from:
bb9d056
)
integer and buffer overflows: introduce safe_malloc_ary
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2011 21:28:33 +0000
(22:28 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Jun 2011 11:07:25 +0000
(12:07 +0100)
When allocating an array, it is necessary to check that the
multiplication (to compute the size in bytes) does not overflow.
Do this in a new function safe_malloc_ary, which we call in both the
places where safe_malloc was previously used with an unchecked
multiplication.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
No differences found