Wireshark-bugs: [Wireshark-bugs] [Bug 9263] Buildbot crash output: fuzz-2013-10-10-12811.pcap

Date: Sun, 03 Nov 2013 14:37:35 +0000

Comment # 21 on bug 9263 from
Jörg, I also find that comment confusing (both the out of bounds issue and the
possibility of passing in a negative offset).

How about the following:

/** Returns the number of bytes from offset to the end of the buffer,           
 * effectively (tvb_length(tvb) - offset) in normal cases. Returns 0 if offset  
 * is at or past the end of the buffer.                                         
 *                                                                              
 * Offset can be negative to indicate an offset from the back of the buffer     
 * instead of the front, in which case the function simply returns (-offset)    
 * unless that would be out of bounds (in which case it returns 0 again).       
 *                                                                              
 * No exception is thrown. */


You are receiving this mail because:
  • You are watching all bug changes.