mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
pidl: fix printing of server side ndr request debug messages
The macros NDR_PRINT_IN_DEBUG and NDR_PRINT_OUT_DEBUG are made for the client side. For the server side, the NDR_SET_VALUES flag needs to be added for the OUT struct and not for the IN struct, otherwise, the OUT part can print uninitialized data and the IN part may recalculate string lengths illegally.
This commit is contained in:
parent
ad871b73a2
commit
045f4c96d5
@ -171,7 +171,7 @@ sub ParseFunction($$)
|
||||
pidl "}";
|
||||
pidl "";
|
||||
pidl "if (DEBUGLEVEL >= 10) {";
|
||||
pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, r);";
|
||||
pidl "\tNDR_PRINT_FUNCTION_DEBUG($fn->{NAME}, NDR_IN, r);";
|
||||
pidl "}";
|
||||
pidl "";
|
||||
|
||||
@ -190,7 +190,7 @@ sub ParseFunction($$)
|
||||
pidl "}";
|
||||
pidl "";
|
||||
pidl "if (DEBUGLEVEL >= 10) {";
|
||||
pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);";
|
||||
pidl "\nNDR_PRINT_FUNCTION_DEBUG($fn->{NAME}, NDR_OUT | NDR_SET_VALUES, r);";
|
||||
pidl "}";
|
||||
pidl "";
|
||||
pidl "push = ndr_push_init_ctx(r);";
|
||||
|
Loading…
Reference in New Issue
Block a user