mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Fixed a off-by-one error in printtableSize(). The routine was not
taking into account the fact that each row gets a newline appended and so was reporting less needed memory that actually necessary in very special cases. Patrick found the issue and reported it in http://seclists.org/nmap-dev/2009/q1/0735.html
This commit is contained in:
parent
9c3cc6458b
commit
90b6ee102f
1 changed files with 2 additions and 2 deletions
|
|
@ -233,8 +233,8 @@ int NmapOutputTable::printableSize() {
|
|||
// roles then the maximal rowlen needs to be adjusted.
|
||||
for(i = 0; i < numRows; i++) {
|
||||
cell = getCellAddy(i, 0);
|
||||
if(cell->fullrow && cell->strlength > rowlen)
|
||||
rowlen = cell->strlength;
|
||||
if(cell->fullrow && cell->strlength + 1 > rowlen)
|
||||
rowlen = cell->strlength + 1; /* Account for the newline with the +1 */
|
||||
}
|
||||
|
||||
return rowlen * numRows;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue