mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Avoid null pointer deref when getting IPv4 header options
This commit is contained in:
parent
df50e3091e
commit
98b1467a48
1 changed files with 2 additions and 1 deletions
|
|
@ -681,7 +681,8 @@ const u8 *IPv4Header::getOpts() const {
|
|||
const u8 *IPv4Header::getOpts(int *len) const {
|
||||
if(len==NULL)
|
||||
printf("getOpts(): NULL pointer supplied.\n");
|
||||
*len=ipoptlen;
|
||||
else
|
||||
*len=ipoptlen;
|
||||
return h.options;
|
||||
} /* End of getOpts() */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue