[3.0] 879ca02 Another insufficiently wide memset spotted by LLVM.
Tollef Fog Heen
tfheen at varnish-cache.org
Wed Aug 17 11:25:34 CEST 2011
commit 879ca02cf57e306616518e9983fe017b8e2ae61f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Aug 1 11:20:48 2011 +0000
Another insufficiently wide memset spotted by LLVM.
diff --git a/bin/varnishd/storage_persistent_subr.c b/bin/varnishd/storage_persistent_subr.c
index ea8d6e2..552c0be 100644
--- a/bin/varnishd/storage_persistent_subr.c
+++ b/bin/varnishd/storage_persistent_subr.c
@@ -67,7 +67,7 @@ smp_def_sign(const struct smp_sc *sc, struct smp_signctx *ctx,
AZ(off & 7); /* Alignment */
assert(strlen(id) < sizeof ctx->ss->ident);
- memset(ctx, 0, sizeof ctx);
+ memset(ctx, 0, sizeof *ctx);
ctx->ss = (void*)(sc->base + off);
ctx->unique = sc->unique;
ctx->id = id;
More information about the varnish-commit
mailing list