summaryrefslogtreecommitdiff
path: root/librpc/ndr
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-14 13:43:03 +0200
committerStefan Metzmacher <metze@samba.org>2013-10-02 13:08:01 +0200
commit816e68f94fe500b9d68fd29021d432b84d3139b7 (patch)
tree0fb137c397c6d0df682952edc27b65b40e7359f2 /librpc/ndr
parent9ac32866db2c4244d867093e2594347f4707313f (diff)
downloadsamba-816e68f94fe500b9d68fd29021d432b84d3139b7.tar.gz
samba-816e68f94fe500b9d68fd29021d432b84d3139b7.tar.bz2
samba-816e68f94fe500b9d68fd29021d432b84d3139b7.zip
libndr: Fix ndr_print_bitmap_flag for value=0
Don't endlessly loop Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'librpc/ndr')
-rw-r--r--librpc/ndr/ndr_basic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index 35b223da7a..113745ce97 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -1020,6 +1020,10 @@ _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const ch
/* this is an attempt to support multi-bit bitmap masks */
value &= flag;
+ if (value == 0) {
+ return;
+ }
+
while (!(flag & 1)) {
flag >>= 1;
value >>= 1;