Skip to content

Commit

Permalink
detect/mpm: fix fast_pattern handling of len >255
Browse files Browse the repository at this point in the history
The fast pattern selection logic would truncate a patterns len to
255 leading to assigning the same pid to different patterns.

This in turn would be caught by the hyperscan setup code which would
abort.

Bug #2714.
  • Loading branch information
victorjulien committed Dec 1, 2018
1 parent eedf08b commit 6f2b974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/detect-engine-mpm.c
Expand Up @@ -1505,7 +1505,7 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx)
return -1;

uint8_t *content = NULL;
uint8_t content_len = 0;
uint16_t content_len = 0;
PatIntId max_id = 0;
DetectFPAndItsId *struct_offset = (DetectFPAndItsId *)ahb;
uint8_t *content_offset = ahb + struct_total_size;
Expand Down

0 comments on commit 6f2b974

Please sign in to comment.