projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-microblaze.git]
/
net
/
netlabel
/
netlabel_kapi.c
diff --git
a/net/netlabel/netlabel_kapi.c
b/net/netlabel/netlabel_kapi.c
index
ea7c670
..
ee3e5b6
100644
(file)
--- a/
net/netlabel/netlabel_kapi.c
+++ b/
net/netlabel/netlabel_kapi.c
@@
-903,7
+903,8
@@
int netlbl_bitmap_walk(const unsigned char *bitmap, u32 bitmap_len,
(state == 0 && (byte & bitmask) == 0))
return bit_spot;
- bit_spot++;
+ if (++bit_spot >= bitmap_len)
+ return -1;
bitmask >>= 1;
if (bitmask == 0) {
byte = bitmap[++byte_offset];