On Tue, Mar 20, 2012 at 3:19 PM, Jakub Zawadzki <[email protected]>wrote:
> On Tue, Mar 20, 2012 at 03:04:23PM +0200, Kaul wrote: > > I might have used tvb_get_const_stringz() incorrectly, yet I don't think > > Wireshark should crash: > > Program received signal SIGSEGV, Segmentation fault. > > tvb_get_const_stringz (tvb=0x1c01b60, offset=10, lengthp=0x9) at > > tvbuff.c:2548 > > 2548 *lengthp = size; > > > > I'm not entirely sure why it crashes yet or why I am using it > incorrectly. > > Last argument of tvb_get_const_stringz() takes pointer to integer (not > value!) > and stores length of string in it. > > If you want to get next N chars (not NUL terminated), and store it as > C-string you > can use tvb_get_ephemeral_string() instead. > Yep, discovered that. My fault. Sorry for the noise. Y. > ___________________________________________________________________________ > Sent via: Wireshark-dev mailing list <[email protected]> > Archives: http://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev > mailto:[email protected]?subject=unsubscribe >
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
