From 91cab64f912843edf686b610dcc5b5a9c3c0bb9d Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Thu, 3 May 2012 12:19:52 +0200 Subject: [PATCH] avoid doublefree corruption when reading commands from stdin --- .gitignore | 2 +- scl-utils.spec | 5 ++++- scl.c | 1 - sources | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e159b93..877d1e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /scl /scl.o /scl.1 -/scl-utils-20120423.tar.gz +/scl-utils-20120503.tar.gz diff --git a/scl-utils.spec b/scl-utils.spec index 718a214..6c305d1 100644 --- a/scl-utils.spec +++ b/scl-utils.spec @@ -1,6 +1,6 @@ Summary: Utilities for alternative packaging Name: scl-utils -Version: 20120423 +Version: 20120503 Release: 1%{?dist} License: GPLv2+ Group: Applications/File @@ -51,6 +51,9 @@ rm -rf %buildroot %{_sysconfdir}/rpm/macros.scl %changelog +* Thu May 03 2012 Jindrich Novy 20120503-1 +- avoid doublefree corruption when reading commands from stdin + * Mon Apr 22 2012 Jindrich Novy 20120423-1 - keep filesystem macros out of the main sources as it is distro-dependent diff --git a/scl.c b/scl.c index 29f1a3c..f771e93 100644 --- a/scl.c +++ b/scl.c @@ -202,7 +202,6 @@ int main(int argc, char **argv) { check_asprintf(&bash_cmd, "/bin/bash %s", tmp); i = system(bash_cmd); - if (stdin_read) free(cmd); free(bash_cmd); unlink(tmp); diff --git a/sources b/sources index 447baa7..988d925 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3e0eb37281bac29b4c6ce3bb7876f8e2 scl-utils-20120423.tar.gz +2feea7953d0a4bd625781b39afd30df0 scl-utils-20120503.tar.gz