Skip to content

Commit

Permalink
witness.idl: Change array type in IDL for the print function
Browse files Browse the repository at this point in the history
It is important that the generated print function checks r->messages
before de-referencing r->messages[num] as r->num can be non-zero
while r->messages is NULL.

There is not witness server in Samba and print functions are only
used during debugging and ndrdump in any case.

The change in the IDL does not change the header and the IDL
function is already nopull,nopush so only the print function changes.

Found by Douglas Bagnall using Honggfuzz and a new fuzzer for
Samba's NDR layer.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
  • Loading branch information
abartlet authored and cryptomilk committed Nov 19, 2019
1 parent c34ec00 commit 183da1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion librpc/idl/witness.idl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ interface witness
witness_notifyResponse_type type;
[value(ndr_size_witness_notifyResponse(r, ndr->flags)-20)] uint32 length;
uint32 num;
[subcontext(4), subcontext_size(length), flag(NDR_REMAINING), switch_is(type)] witness_notifyResponse_message messages[num];
[subcontext(4), subcontext_size(length), flag(NDR_REMAINING), switch_is(type), size_is(num)] witness_notifyResponse_message *messages;
} witness_notifyResponse;

[public] WERROR witness_AsyncNotify(
Expand Down

0 comments on commit 183da1f

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy