Wireshark-commits: [Wireshark-commits] master 12434e9: Fix dissection of Get Info requests.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 2 Apr 2017 22:35:22 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=12434e967808011b4bdffe727c0260ad783d68e6
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

12434e9 by Guy Harris (guy@xxxxxxxxxxxx):

    Fix dissection of Get Info requests.
    
    If the length of the input buffer is zero, it means there *is* no input
    buffer; don't use the offset of that buffer plus the length as the
    offset past the end of the end of the packet, as both will probably be
    zero.  Also, for a request to get quota info, report a warning if
    there's no input buffer, as MS-SMB2 seems to say there must be one.
    
    If the length of the input buffer is *not* zero, ignore the iput buffer
    for requests other than requests to get quota info or full extended
    attribute info, as MS-SMB2 says a server should do that.  Otherwise,
    make sure the offset of the input buffer is past the end of the
    fixed-length part of the request and the offset+length doesn't overflow
    or go past the end of the message.
    
    While we're at it, for some routines that return a "next offset", use
    that return value rather than wiring in the length in the caller.
    
    Bug: 12954
    Change-Id: If3d8846f5e03d0d7cdfe10ddfacb347bd0915a5a
    Reviewed-on: https://code.wireshark.org/review/20874
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  bc48169   DNS: add an expert info if buffer is too short to compute a key id
    adds  12434e9   Fix dissection of Get Info requests.


Summary of changes:
 epan/dissectors/packet-smb2.c |  119 +++++++++++++++++++++++++++++++++--------
 1 file changed, 96 insertions(+), 23 deletions(-)