Author: jmcd Date: 2006-03-15 02:31:11 +0000 (Wed, 15 Mar 2006) New Revision: 14408
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14408 Log: More on fix for coverity #36. The previous fix would cause us to marshall a buffer based on an unknown size. Zero out the sec_desc buffer to prevent this. This is still not getting proper results for a registry security descriptor (everything gets ACCESS DENIED), but at least we aren't blowing out memory now... Modified: branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c trunk/source/libmsrpc/cac_winreg.c Changeset: Modified: branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c =================================================================== --- branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c 2006-03-15 02:16:19 UTC (rev 14407) +++ branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c 2006-03-15 02:31:11 UTC (rev 14408) @@ -831,6 +831,8 @@ uint32 buf_size; SEC_DESC_BUF buf; + ZERO_STRUCT(buf); + if(!hnd) return CAC_FAILURE; Modified: trunk/source/libmsrpc/cac_winreg.c =================================================================== --- trunk/source/libmsrpc/cac_winreg.c 2006-03-15 02:16:19 UTC (rev 14407) +++ trunk/source/libmsrpc/cac_winreg.c 2006-03-15 02:31:11 UTC (rev 14408) @@ -831,6 +831,8 @@ uint32 buf_size; SEC_DESC_BUF buf; + ZERO_STRUCT(buf); + if(!hnd) return CAC_FAILURE;