Re: [Wireshark-dev] tvb_get_nstringz0

2021-03-29 Thread Dario Lombardo
Hi, John, thanks for the follow-up. I have used gdb but I didn't hit any failed assertion. I will file a bug with the test sample and reference you in it so you can have a clearer view of what's going on. On Sun, Mar 28, 2021 at 1:33 AM John Thacker wrote: > > On Sat, Mar 27, 2021 at 2:57 PM Dar

Re: [Wireshark-dev] tvb_get_nstringz0

2021-03-27 Thread John Thacker
On Sat, Mar 27, 2021 at 2:57 PM Dario Lombardo wrote: > Hi John, > thanks, your explanation helped a lot. However I still don't get why the > code crashes. Please let me use the actual buffer sizes since the ones I > told before were examples. The packet is 49, the local buffer is 15. > > When yo

Re: [Wireshark-dev] tvb_get_nstringz0

2021-03-27 Thread Dario Lombardo
Hi John, thanks, your explanation helped a lot. However I still don't get why the code crashes. Please let me use the actual buffer sizes since the ones I told before were examples. The packet is 49, the local buffer is 15. When you call tvb_get_nstringz0() you pass in bufsize = 15. > tvb_get_nstr

Re: [Wireshark-dev] tvb_get_nstringz0

2021-03-26 Thread John Thacker
On Fri, Mar 26, 2021 at 4:22 AM Dario Lombardo wrote: > Hi, > I am a bit puzzled by the use of tvb_get_nstringz0. Let's say I have a > packet 100 bytes long, that does NOT contain NUL. I call tvb_get_nstringz0 > with a buffer 10 bytes long. > For what I can see, the function will seek the packet

[Wireshark-dev] tvb_get_nstringz0

2021-03-26 Thread Dario Lombardo
Hi, I am a bit puzzled by the use of tvb_get_nstringz0. Let's say I have a packet 100 bytes long, that does NOT contain NUL. I call tvb_get_nstringz0 with a buffer 10 bytes long. For what I can see, the function will seek the packet for NUL, stopping at the end of the packet, copying the result int