diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2016-11-30 09:17:53 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2016-11-30 09:17:53 +0200 |
commit | 4c53e5755e3501df44029390f0b62d2a5a6a6cf9 (patch) | |
tree | e4a3cc6e4ea355d645a961e44bb07c5c0801fd80 | |
parent | 3b1012014da48bd4cb8819abd56bee8f410e97cc (diff) | |
download | rpm-4c53e5755e3501df44029390f0b62d2a5a6a6cf9.tar.gz |
Ensure rpmlead is fully initialized
Fix sneaky regression from commit 83a8640b47177d665b2aef9afc7ed8bde36f5103,
the lead used to be calloc()'ed so it was guaranteed all zeros, now its not.
Bulldoze to zero with memset() instead.
-rw-r--r-- | lib/rpmlead.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rpmlead.c b/lib/rpmlead.c index e5e02b196..981bc8f60 100644 --- a/lib/rpmlead.c +++ b/lib/rpmlead.c @@ -52,6 +52,7 @@ static int rpmLeadFromHeader(Header h, struct rpmlead_s *l) rpmGetArchInfo(NULL, &archnum); rpmGetOsInfo(NULL, &osnum); + memset(l, 0, sizeof(*l)); l->major = 3; l->minor = 0; l->archnum = archnum; |