Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 2162] for() loop evaluation order in ep_strndup() can trig

Date: Fri, 4 Jan 2008 07:22:18 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2162





------- Comment #3 from jyoung@xxxxxxx  2008-01-04 07:22 GMT -------
Above I said:
> Because the input data was NOT a legitimate ASCII NUL string but rather a
> three byte character array, a test of src[4] for an ASCII NUL trigged the
> valgrind error "invalid read of size 1".

It should have said a "... a test of src[3] for an ASCII NUL...".  

When the variable i has a value of 3 the test of value of src[3] is attempting
to test the non-existant 4th byte of the supplied 3 byte array.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.