avoid doublefree corruption when reading commands from stdin

This commit is contained in:
Jindrich Novy 2012-05-03 12:19:52 +02:00
parent 24d87f2a06
commit 91cab64f91
4 changed files with 6 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/scl /scl
/scl.o /scl.o
/scl.1 /scl.1
/scl-utils-20120423.tar.gz /scl-utils-20120503.tar.gz

View File

@ -1,6 +1,6 @@
Summary: Utilities for alternative packaging Summary: Utilities for alternative packaging
Name: scl-utils Name: scl-utils
Version: 20120423 Version: 20120503
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/File Group: Applications/File
@ -51,6 +51,9 @@ rm -rf %buildroot
%{_sysconfdir}/rpm/macros.scl %{_sysconfdir}/rpm/macros.scl
%changelog %changelog
* Thu May 03 2012 Jindrich Novy <jnovy@redhat.com> 20120503-1
- avoid doublefree corruption when reading commands from stdin
* Mon Apr 22 2012 Jindrich Novy <jnovy@redhat.com> 20120423-1 * Mon Apr 22 2012 Jindrich Novy <jnovy@redhat.com> 20120423-1
- keep filesystem macros out of the main sources as - keep filesystem macros out of the main sources as
it is distro-dependent it is distro-dependent

1
scl.c
View File

@ -202,7 +202,6 @@ int main(int argc, char **argv) {
check_asprintf(&bash_cmd, "/bin/bash %s", tmp); check_asprintf(&bash_cmd, "/bin/bash %s", tmp);
i = system(bash_cmd); i = system(bash_cmd);
if (stdin_read) free(cmd);
free(bash_cmd); free(bash_cmd);
unlink(tmp); unlink(tmp);

View File

@ -1 +1 @@
3e0eb37281bac29b4c6ce3bb7876f8e2 scl-utils-20120423.tar.gz 2feea7953d0a4bd625781b39afd30df0 scl-utils-20120503.tar.gz