commit 45a1cbb7514f9db5fe2d7c2207d7723092aa164d
Author: Volker Lendecke <vl@samba.org>
AuthorDate: Thu Jul 11 14:57:53 2013 +0200
Commit: Karolin Seeger <kseeger@samba.org>
CommitDate: Mon Oct 14 10:11:48 2013 +0200
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.
---
lib/ccan/tally/tally.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index 774373c..29f0555 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++;