Wireshark-commits: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with le
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 23 Apr 2014 15:57:14 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fe195c0c978b4b92dc5a77daa6449a7f1314243d
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

fe195c0 by Evan Huus (eapache@xxxxxxxxx):

    Don't throw for offset at end of TVB with len -1.
    
    g867a1827e7dc88896ee27a107eb35c4b3973d270 introduced a change to cleanup/fix
    handling of bounds checks for -1 length fields, but it ended up guaranteeing a
    throw for 0-length tvbs, which isn't good; we ought to be able to add 0-length
    FT_PROTOCOL items at the very least.
    
    Better names for the function than _cheat are welcome, but I want to shut up the
    buildbot.
    
    Change-Id: I24610f947d03dac32766e2a0ffa0ff7bcc74c3e8
    Reviewed-on: https://code.wireshark.org/review/1303
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    

Actions performed:

    from  be13690   Continuation of bug 9532.
    adds  fe195c0   Don't throw for offset at end of TVB with len -1.


Summary of changes:
 epan/proto.c  |    2 +-
 epan/tvbuff.c |   18 ++++++++++++++++++
 epan/tvbuff.h |    6 ++++++
 3 files changed, 25 insertions(+), 1 deletion(-)