summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-07-11 14:57:53 +0200
committerKarolin Seeger <kseeger@samba.org>2013-10-14 10:11:48 +0200
commit45a1cbb7514f9db5fe2d7c2207d7723092aa164d (patch)
tree1cc0ffbc0d2b3cc7f083a49cab5321c23bec6a90
parentd9321421b88a3ba7c98186934b5fe8872f764f15 (diff)
downloadsamba-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.c2
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++;