Skip to content

Correct l_uintset_isempty() logic

Ossama Othman ell 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2unit: Add l_uintset_isempty() testunit/test-uintset.c+17 -00 replies
2/2uintset: Do not exceed max offset in empty checkell/uintset.c+4 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Correct l_uintset_isempty() logic

The loop iteration over the 'bits' array in l_uintset_isempty() exceeded the maximum offset for the given l_uintset, resulting in out-of-bounds bits being considered for emptiness. Add a test that demonstrates the problem, and correct the maximum offset when iterating over the l_uintset 'bits' field.

Ossama Othman (2):
unit: Add l_uintset_isempty() test
uintset: Do not exceed max offset in empty check

 ell/uintset.c       |  5 ++++-
 unit/test-uintset.c | 17 +++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
Signature · 1 line
2.20.1