Project

General

Profile

Actions

Bug #1289

closed
KS VJ

MPM b2gm matcher has questionable code

Bug #1289: MPM b2gm matcher has questionable code

Added by Ken Steele over 11 years ago. Updated about 10 years ago.

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

Description

The B2GM MPM matcher has questionable code related to use of B2gmPattern1 structures. These are only used for patterns of length 1.

The array ctx->patterns1 is of type uint8_t*, but are then always cast to B2gmPattern1 pointers. Why is patterns1 not of type (B2gmPattern1*)?
Offsets into the uint8_t array are started at 1 with a comment about skipping the first byte of the buffer. This will always result in unaligned access to the structure.

VJ Updated by Victor Julien over 11 years ago Actions #1

Probably not worth fixing, instead we can remove this code. Don't think anyone uses it.

KS Updated by Ken Steele over 11 years ago Actions #2

My work around was to remove the b2gm and b2gc MPM.

AH Updated by Andreas Herz over 10 years ago Actions #3

  • Assignee set to OISF Dev
  • Target version set to TBD

Do we have some updates for that? :)

VJ Updated by Victor Julien over 10 years ago Actions #4

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Victor Julien
  • Target version changed from TBD to 3.1

Scheduled for removal in 3.1.

VJ Updated by Victor Julien about 10 years ago Actions #5

  • Target version changed from 3.1 to 3.1rc1

VJ Updated by Victor Julien about 10 years ago Actions #6

  • Status changed from Assigned to Closed
Actions

Also available in: PDF Atom