chiark
/
gitweb
/
~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
integer and buffer overflows: introduce safe_malloc_ary
[secnet]
/
ipaddr.c
diff --git
a/ipaddr.c
b/ipaddr.c
index 433db62ef406b7912a52a09f5d641080d9b3821d..8de384bfa190afadc7da9731a77c1ca9d794eac0 100644
(file)
--- a/
ipaddr.c
+++ b/
ipaddr.c
@@
-17,7
+17,7
@@
struct subnet_list *subnet_list_new(void)
r=safe_malloc(sizeof(*r),"subnet_list_new:list");
r->entries=0;
r->alloc=DEFAULT_ALLOC;
- r->list=safe_malloc
(sizeof(*r->list)*
r->alloc,"subnet_list_new:data");
+ r->list=safe_malloc
_ary(sizeof(*r->list),
r->alloc,"subnet_list_new:data");
return r;
}