Ethereal-dev: Re: [Ethereal-dev] [PATCH] fix for bug 742

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Paolo Abeni <paolo.abeni@xxxxxxxx>
Date: Thu, 16 Feb 2006 13:23:21 +0100
On Thu, 2006-02-16 at 11:56 +0100, Joerg Mayer wrote:
> You will probably need to move the declaration somewhat up:
> 
> x509af.cnf: In function 'dissect_x509af_SubjectName':
> x509af.cnf:118: warning: ISO C90 forbids mixed declarations and code

Another attempt...

cut & past from first message, just to keep track of what I'm trying to
do...

the attached patch should fix bug 742.

The issue is (at least, I think so...) in the packet-x509af dissector
A null pointer is passes as parameter of a " %s " format string. 
Something like:

printf("%s", NULL);

it does not hurt under linux and is fatal under windows.

ciao,

Paolo

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
  Vuoi bere tanta acqua pura e risparmiare ben 495 euro all'anno?
* Con BeviSano avrai finito di comprare acqua in bottiglia - clicca qui 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3628&d=16-2
Index: asn1/x509af/x509af.cnf
===================================================================
--- asn1/x509af/x509af.cnf	(revision 17315)
+++ asn1/x509af/x509af.cnf	(working copy)
@@ -110,8 +110,10 @@
 
 #.FN_BODY SubjectName
 
+  const char* str;
   %(DEFAULT_BODY)s
 
-  proto_item_append_text(proto_item_get_parent(tree), " (%%s)", x509if_get_last_dn());
+  str = x509if_get_last_dn();
+  proto_item_append_text(proto_item_get_parent(tree), " (%%s)", str?str:"");
 
 #.END