cvs commit: src/bin/sh options.c

Stefan Farfeleder stefanf at
Sat Mar 22 07:06:04 PDT 2008

stefanf     2008-03-22 14:06:01 UTC

  FreeBSD src repository

  Modified files:
    bin/sh               options.c 
  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

More information about the cvs-src mailing list