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

cvs commit: src/sbin/sysctl sysctl.c


From: Chris Pressey <cpressey@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2005 19:13:52 -0800 (PST)

cpressey    2005/01/17 19:13:52 PST

DragonFly src repository

  Modified files:
    sbin/sysctl          sysctl.c 
  Log:
  Unlike printf(3), fwrite(3) doesn't stop at the first NUL character
  it finds in the string; and since the full length of the string was
  being passed to fwrite(3), sysctl(8) commands were mistakenly
  outputting a NUL character after their text output.
  
  Fix by only fwrite(3)ing the string up to the first NUL character.
  
  Discovered-by: y0netan1
  
  Revision  Changes    Path
  1.10      +5 -1      src/sbin/sysctl/sysctl.c


http://www.dragonflybsd.org/cvsweb/src/sbin/sysctl/sysctl.c.diff?r1=1.9&r2=1.10&f=u



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