DragonFly BSD
DragonFly commits List (threaded) for 2006-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Mar 2006 09:24:20 -0800 (PST)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]