Searched hist:158152 (Results 1 - 1 of 1) sorted by relevance

/freebsd-10.0-release/usr.bin/systat/
H A Dvmstat.cdiff 158152 Sat Apr 29 22:50:08 MDT 2006 bde Backed out rev.1.49 since it had buffer overruns and only worked
accidentally.

Read buffer overruns:
The size of the target array (TSOTTA == 10) is a wrong limit to use for
scanning the source string.

Write buffer overruns:
TSOTTA is also a wrong limit to use for copying to the target buffer,
since we want to add a NUL terminator afterwards. TSOTTA was also 1
too small for holding both the desired number of visible characters
and the NUL.

Worked accidentally:
There is error in the algorithm that tends to result in the space saved
by stripping "irq" not actually being used, but some cases worked
accidentally provided "irqN" is near the end of the source string and
"N" is only 1 digit.

Starting with 5.mumble-CURRENT, "irqN" is at the beginning of the
string on all (?) arches that have it and the accidents don't happen.
E.g. on i386's, the keyboard irq is now named
"irq1: atkbd0<bogus blank padding>" by the kernel, and this name was
converted to "1: atkb" -- not only the device number but part of the
device name has been lost --, while before 5.mumble the kernel name
was "atkbd0 irq1" and systat accidentally preserved the irq number to
give "atkbd0 1". The ":" in the string wastes precious space, and
stripping "irq" results in descriptions starting with numbers which
makes them look too much like counts. This commit just fixes the last
problem.

Completed in 71 milliseconds