Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
zsh.23099
CVE-2017-18205.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2017-18205.patch of Package zsh.23099
commit eb783754bdb74377f3cea4ceca9c23a02ea1bf58 Author: Peter Stephenson <pws@zsh.org> Date: Tue Jun 13 15:41:00 2017 +0100 41284: Fix NULL dereference in cd. This happened in sh compatiblity mode if HOME was not set and cd was used with no argument. Index: zsh-5.0.5/Src/builtin.c =================================================================== --- zsh-5.0.5.orig/Src/builtin.c +++ zsh-5.0.5/Src/builtin.c @@ -844,8 +844,13 @@ cd_get_dest(char *nam, char **argv, int dir = nextnode(firstnode(dirstack)); if (dir) zinsertlinknode(dirstack, dir, getlinknode(dirstack)); - else if (func != BIN_POPD) + else if (func != BIN_POPD) { + if (!home) { + zwarnnam(nam, "HOME not set"); + return NULL; + } zpushnode(dirstack, ztrdup(home)); + } } else if (!argv[1]) { int dd; char *end; @@ -900,6 +905,10 @@ cd_get_dest(char *nam, char **argv, int if (!dir) { dir = firstnode(dirstack); } + if (!dir || !getdata(dir)) { + DPUTS(1, "Directory not set, not detected early enough"); + return NULL; + } if (!(dest = cd_do_chdir(nam, getdata(dir), hard))) { if (!target) zsfree(getlinknode(dirstack));
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor