Project

General

Profile

Actions

Optimization #4496

closed

decode: remove NULL checks after header casts

Added by Victor Julien over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

Decoders should never be called with a NULL pointer as their pkt input, yet a common pattern is that a NULL check is done after a cast of this pointer to a header specific type.

We should remove these checks but put a DEBUG_VALIDATE_BUG_ON(pkt == NULL); at the top of each decode function. This way fuzzing can try to falsify this assumption.

Actions

Also available in: Atom PDF