Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev27844: /trunk/epan/dissectors/ /trunk
From: "Anders Broman" <anders.broman@xxxxxxxxxxxx>
Date: Wed, 25 Mar 2009 10:31:51 +0100
 

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Joerg Mayer
Sent: den 25 mars 2009 10:24
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] [Wireshark-commits] rev27844:
/trunk/epan/dissectors/ /trunk/epan/dissectors/:packet-dect.c

On Tue, Mar 24, 2009 at 06:08:43PM -0700, Guy Harris wrote:
>> or, as translate.google.com says:
>> 
>> > I further noted that the b-field is not displayed correctly.
>> > Either g_snprintf broken, or we are unable to both the function to 
>> > use.
>> > The string is made from 16x% .2 x + spaces together what My 
>> > calculations of a maximum length of 144 characters + null byte 
>> > follows.
>> > therefore I have the string variable to 145 high and use again 
>> > sprintf. here the patch to do so.
>> 
>> So what was g_snprintf() doing that was wrong?  (The second argument 
>> was correct in the calls - the total length of the buffer should be 
>> passed, as that length includes the terminating null byte.)  And what

>> version of GLib was he using?

>The problem seems to be that only the last two characters are shown
instead of the full length string. A problem with g_snprintf may be that
it doesn't like >to use a rhs argument as its lhs result. sprintf
supports that.
>
> ciao
>     Joerg
Unfortunatly we have marked sprintf as 'depriceated'
"Error: Found prohibited APIs in packet-dect.c: sprintf"

Regards
Anders

________________________________________________________________________
___
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe