rpm/rpm-4.11.1-caps-double-free.patch

20 lines
542 B
Diff
Raw Normal View History

commit 65eec62cb7796dad6fbf1d5436251e176449f522
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Thu Aug 29 16:32:32 2013 +0300
Fix double-free on %caps() wildcard %files entry (RhBug:956190)
diff --git a/build/files.c b/build/files.c
index 20f452f..eed5696 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1448,7 +1448,7 @@ static rpmRC addFile(FileList fl, const char * diskPath,
}
if (fl->cur.caps) {
- flp->caps = fl->cur.caps;
+ flp->caps = xstrdup(fl->cur.caps);
} else {
flp->caps = xstrdup("");
}