Skip to content
Snippets Groups Projects
Commit afcc911c authored by Marek Vavrusa's avatar Marek Vavrusa Committed by Gerrit Code Review
Browse files

Check if partial match doesn't exceed maximum offset boundary.

Change-Id: I477c849e562bf1390dba8b772e1cf25371d4bcd4
parent 095cb46a
Branches
Tags
No related merge requests found
......@@ -55,7 +55,7 @@ static bool knot_response_compr_score(uint8_t *n, uint8_t *p, uint8_t labels,
}
/* New best score. */
if (score > match->lbcount) {
if (score > match->lbcount && off <= KNOT_WIRE_PTR_MAX) {
match->lbcount = score;
match->off = off;
return true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment