Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
flow/test: Fix crash in float-validator
Browse files Browse the repository at this point in the history
If item couldn't be found in sequence, `op` would be NULL, causing
a NULL pointer dereference in the next line.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
  • Loading branch information
lpereira committed Sep 28, 2015
1 parent ed59836 commit dacb69c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/flow/test/float-validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ float_validator_process(
r = sol_flow_packet_get_drange(packet, &input);
SOL_INT_CHECK(r, < 0, r);
op = sol_vector_get(&mdata->values, mdata->next_index);
SOL_NULL_CHECK(op, -EINVAL);
match = sol_drange_val_equal(input.val, *op);
mdata->next_index++;

Expand Down

0 comments on commit dacb69c

Please sign in to comment.