cvs commit: src/sbin/sysctl sysctl.c

Chris Pressey cpressey at
Mon Jan 17 19:15:50 PST 2005

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

DragonFly src repository

  Modified files:
    sbin/sysctl          sysctl.c 
  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

More information about the Commits mailing list