Date: Sat, 22 Mar 2008 14:06:01 +0000 (UTC) From: Stefan Farfeleder <stefanf@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/sh options.c Message-ID: <200803221406.m2ME62pi010914@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
stefanf 2008-03-22 14:06:01 UTC FreeBSD src repository Modified files: bin/sh options.c Log: Reset the internal state used for the 'getopts' built-in when 'shift' or 'set' are used to modify the arguments. Not doing so caused random memory reads or null pointer dereferences when 'getopts' was called again later (SUSv3 says getopts produces unspecified results in this case). PR: 48318 Revision Changes Path 1.26 +2 -2 src/bin/sh/options.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803221406.m2ME62pi010914>