mirror of
https://github.com/nmap/nmap.git
synced 2026-01-18 12:19:02 +00:00
Avoid null pointer deref when getting IPv4 header options
This commit is contained in:
@@ -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() */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user