avoid doublefree corruption when reading commands from stdin
This commit is contained in:
parent
24d87f2a06
commit
91cab64f91
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
/scl
|
/scl
|
||||||
/scl.o
|
/scl.o
|
||||||
/scl.1
|
/scl.1
|
||||||
/scl-utils-20120423.tar.gz
|
/scl-utils-20120503.tar.gz
|
||||||
|
@ -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
1
scl.c
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user