Skip to content
Commit 50b8629a authored by Paul Moore's avatar Paul Moore
Browse files

netlabel: handle sparse category maps in netlbl_catmap_getlong()



In cases where the category bitmap is sparse enough that gaps exist
between netlbl_lsm_catmap structs, callers to netlbl_catmap_getlong()
could find themselves prematurely ending their search through the
category bitmap.  Further, the methods used to calculate the 'idx'
and 'off' values were incorrect for bitmaps this large.  This patch
changes the netlbl_catmap_getlong() behavior so that it always skips
over gaps and calculates the index and offset values correctly.

Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 8bebe88c
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