diff options
author | 2015-04-29 04:00:25 +0000 | |
---|---|---|
committer | 2015-04-29 04:00:25 +0000 | |
commit | 371275cabfe7ee71db4f4e23b9a5d966b335d3bc (patch) | |
tree | 09cf87945bdcad26b880cf103ee5c9a520f7f53a /usr.bin/diff/diff.c | |
parent | Allow ListenAddress, Port and AddressFamily in any order. bz#68, (diff) | |
download | wireguard-openbsd-371275cabfe7ee71db4f4e23b9a5d966b335d3bc.tar.xz wireguard-openbsd-371275cabfe7ee71db4f4e23b9a5d966b335d3bc.zip |
Change internal xrealloc() to a idiom-following xreallocarray().
This loses a "new size is 0" failure case. Probably not relevant;
and since we develop this in OpenBSD, we'll catch that before someone
else imports this...
ok millert
Diffstat (limited to 'usr.bin/diff/diff.c')
-rw-r--r-- | usr.bin/diff/diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index fbe46714f7d..743e9332f36 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.58 2015/01/16 06:40:07 deraadt Exp $ */ +/* $OpenBSD: diff.c,v 1.59 2015/04/29 04:00:25 deraadt Exp $ */ /* * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -337,7 +337,7 @@ push_ignore_pats(char *pattern) else { /* old + "|" + new + NUL */ len = strlen(ignore_pats) + strlen(pattern) + 2; - ignore_pats = xrealloc(ignore_pats, 1, len); + ignore_pats = xreallocarray(ignore_pats, 1, len); strlcat(ignore_pats, "|", len); strlcat(ignore_pats, pattern, len); } |