Project

General

Profile

Actions

Optimization #4496

closed
VJ JL

decode: remove NULL checks after header casts

Optimization #4496: decode: remove NULL checks after header casts

Added by Victor Julien almost 5 years ago. Updated almost 5 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.

JL Updated by Jeff Lucovsky almost 5 years ago Actions #1

  • Status changed from Assigned to In Progress

JL Updated by Jeff Lucovsky almost 5 years ago Actions #2

  • Status changed from In Progress to In Review

JL Updated by Jeff Lucovsky almost 5 years ago Actions #3

  • Status changed from In Review to Closed
Actions

Also available in: PDF Atom