diff options
author | Volker Lendecke <vl@samba.org> | 2013-07-11 14:57:53 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-10-14 10:11:48 +0200 |
commit | 45a1cbb7514f9db5fe2d7c2207d7723092aa164d (patch) | |
tree | 1cc0ffbc0d2b3cc7f083a49cab5321c23bec6a90 | |
parent | d9321421b88a3ba7c98186934b5fe8872f764f15 (diff) | |
download | samba-45a1cbb7514f9db5fe2d7c2207d7723092aa164d.tar.gz |
ccan: Fix calling memset with zero length parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 11 16:55:49 CEST 2013 on sn-devel-104
Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #10190 - Fix memset used with constant zero length parameter.
-rw-r--r-- | lib/ccan/tally/tally.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c index 774373ca0f..29f0555880 100644 --- a/lib/ccan/tally/tally.c +++ b/lib/ccan/tally/tally.c @@ -506,11 +506,11 @@ char *tally_histogram(const struct tally *tally, if (count > covered) { count -= covered; + memset(p, '*', count); } else { count = 0; } - memset(p, '*', count); p += count; *p = '\n'; p++; |