Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Apr 2002 18:29:56 -0800 (PST)
From:      "J. Mallett" <jmallett@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.bin/sed process.c
Message-ID:  <200204070229.g372Tui51878@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jmallett    2002/04/06 18:29:56 PST

  Modified files:
    usr.bin/sed          process.c 
  Log:
  Fix sed(1) in the case where a last line is specified and hold space is not
  specified, and then the first part of the pattern space is deleted, when
  there are two or more input lines, as this results in subtraction of one from
  an unsigned integral value of '0'.  That bogus value is used in one case
  for a loop (that will run far too many times in this case) and a function to
  search for a value within a specified range of memory, however now the range
  of memory is obscenely large and a segmentation fault will occur.  This is
  fixed by checking for and appropriately handling a nil pattern space as if
  the specified search in memory failed, as indeed it obviously will with nil
  pattern space.
  
  Submitted by:   Tim J. Robbins <tim@robbins.dropbear.id.au>
  PR:             bin/34813
  Reviewed by:    mike
  MFC after:      1 day
  
  Revision  Changes    Path
  1.15      +5 -3      src/usr.bin/sed/process.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204070229.g372Tui51878>