Author: obnox Date: 2007-08-29 14:34:15 +0000 (Wed, 29 Aug 2007) New Revision: 24784
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24784 Log: Initialize uninitalized data to prevent segfaults. Thanks to Volker for the hint! Michael Modified: branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c Changeset: Modified: branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c =================================================================== --- branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c 2007-08-29 14:08:29 UTC (rev 24783) +++ branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c 2007-08-29 14:34:15 UTC (rev 24784) @@ -182,6 +182,11 @@ /* Return output parameters */ if (r.mapped_count == 0) { + for (i = 0; i < num_sids; i++) { + (names)[i] = NULL; + (domains)[i] = NULL; + (types)[i] = SID_NAME_UNKNOWN; + } result = NT_STATUS_NONE_MAPPED; goto done; } Modified: branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c =================================================================== --- branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c 2007-08-29 14:08:29 UTC (rev 24783) +++ branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c 2007-08-29 14:34:15 UTC (rev 24784) @@ -182,6 +182,11 @@ /* Return output parameters */ if (r.mapped_count == 0) { + for (i = 0; i < num_sids; i++) { + (names)[i] = NULL; + (domains)[i] = NULL; + (types)[i] = SID_NAME_UNKNOWN; + } result = NT_STATUS_NONE_MAPPED; goto done; }