summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-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;