mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
Fix a bug in --script-trace hex dump output resulting in bytes with highest bit set to be prefixed by ffffff.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Fix a bug in --script-trace hex dump output resulting in bytes with
|
||||
highest bit set to be prefixed by ffffff. [Sven Klemm]
|
||||
|
||||
o Updated rpcinfo NSE script to use the new pack/unpack (binlib)
|
||||
functions, use the new tab library, include better documentation, and
|
||||
fix some bugs. [Sven Klemm]
|
||||
|
||||
@@ -87,7 +87,7 @@ static std::string hexify (const char *str, size_t len)
|
||||
if (isprint(str[i]) || isspace(str[i]))
|
||||
ret << str[i];
|
||||
else
|
||||
ret << std::setw(3) << "\\" << (unsigned int) str[i];
|
||||
ret << std::setw(3) << "\\" << (unsigned int)(unsigned char) str[i];
|
||||
}
|
||||
return ret.str();
|
||||
}
|
||||
@@ -98,7 +98,7 @@ static std::string hexify (const char *str, size_t len)
|
||||
ret << std::setw(8) << i << ": ";
|
||||
for (size_t j = i; j < i + 16; j++)
|
||||
if (j < len)
|
||||
ret << std::setw(2) << (unsigned int) str[j] << " ";
|
||||
ret << std::setw(2) << (unsigned int)(unsigned char) str[j] << " ";
|
||||
else
|
||||
ret << " ";
|
||||
for (size_t j = i; j < i + 16 && j < len; j++)
|
||||
|
||||
Reference in New Issue
Block a user