svn commit: samba r22004 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Wireshark

jelmer at samba.org jelmer at samba.org
Wed Mar 28 22:52:38 GMT 2007


Author: jelmer
Date: 2007-03-28 22:52:37 +0000 (Wed, 28 Mar 2007)
New Revision: 22004

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22004

Log:
Check for dereferencing null pointers. 

Patch by Ronnie Sahlberg.

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:merge
...skipped...

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2007-03-28 19:47:59 UTC (rev 22003)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm	2007-03-28 22:52:37 UTC (rev 22004)
@@ -162,8 +162,12 @@
 	pidl_code "$dissectorname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)";
 	pidl_code "{";
 	indent;
-	pidl_code "g$e->{BASE_TYPE} parameter;";
+	pidl_code "g$e->{BASE_TYPE} parameter=0;";
+	pidl_code "if(param){";
+	indent;
 	pidl_code "parameter=(g$e->{BASE_TYPE})*param;";
+	deindent;
+	pidl_code "}";
 	pidl_code "offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, &parameter);";
 	pidl_code "if(param){";
 	indent;



More information about the samba-cvs mailing list