cvs commit: src/lib/libc/string strnstr.c

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Mar 20 09:26:00 PST 2006


dillon      2006/03/20 09:24:20 PST

DragonFly src repository

  Modified files:
    lib/libc/string      strnstr.c 
  Log:
  strnstr() was testing one byte beyond the specified length in certain
  cases, which can cause a segfault if the 'big' string is not nul terminated
  and abutts unmapped memory space.
  
  This sort of thing can occur when a file is memory mapped and searched
  using strnstr().
  
  Revision  Changes    Path
  1.4       +3 -1      src/lib/libc/string/strnstr.c


http://www.dragonflybsd.org/cvsweb/src/lib/libc/string/strnstr.c.diff?r1=1.3&r2=1.4&f=u





More information about the Commits mailing list