Author: jerry Date: 2005-08-02 23:23:25 +0000 (Tue, 02 Aug 2005) New Revision: 8956
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8956 Log: fix segfault caused by trying to parse a UNISTR2 and not a UNISTR2* Modified: branches/SAMBA_3_0/source/rpc_parse/parse_svcctl.c trunk/source/rpc_parse/parse_svcctl.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_parse/parse_svcctl.c =================================================================== --- branches/SAMBA_3_0/source/rpc_parse/parse_svcctl.c 2005-08-02 23:15:56 UTC (rev 8955) +++ branches/SAMBA_3_0/source/rpc_parse/parse_svcctl.c 2005-08-02 23:23:25 UTC (rev 8956) @@ -808,8 +808,10 @@ if (r_u->returned > 4) { if (!prs_uint32("offset", ps, depth, &r_u->offset)) return False; - if(!prs_unistr2(True, "description ", ps, depth, r_u->description)) + + if ( !prs_pointer( desc, ps, depth, (void**)&r_u->description, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) ) return False; + if(!prs_align(ps)) return False; } else { Modified: trunk/source/rpc_parse/parse_svcctl.c =================================================================== --- trunk/source/rpc_parse/parse_svcctl.c 2005-08-02 23:15:56 UTC (rev 8955) +++ trunk/source/rpc_parse/parse_svcctl.c 2005-08-02 23:23:25 UTC (rev 8956) @@ -808,8 +808,10 @@ if (r_u->returned > 4) { if (!prs_uint32("offset", ps, depth, &r_u->offset)) return False; - if(!prs_unistr2(True, "description ", ps, depth, r_u->description)) + + if ( !prs_pointer( desc, ps, depth, (void**)&r_u->description, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) ) return False; + if(!prs_align(ps)) return False; } else {
