Wireshark-commits: [Wireshark-commits] lts-1.12.1 5451012: ncp2222: initialize buffer in build_expe
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 16 Nov 2014 17:09:45 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=54510127483ebe114b5a19d2f8d9f07abb6f3c1d
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: lts-1.12.1
Repository: wireshark

Commits:

5451012 by Evan Huus (eapache@xxxxxxxxx):

    ncp2222: initialize buffer in build_expert_data
    
    We do a bunch of conditional logic to fill in the buffer, and then were checking
    strlen(buffer) to see if we'd actually filled it in or not, but if we hadn't
    then the buffer was garbage and strlen(buffer) was throwing valgrind warnings.
    Ensure this works as intended by setting the first byte of the buffer
    unconditionally at the beginning, so strlen(buffer) returns 0 as expected in
    that case.
    
    Bug: 10628
    Change-Id: I6f6c29fbbcb601b6ebccb3a4b312f0fa72c169ae
    Reviewed-on: https://code.wireshark.org/review/4925
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Reviewed-on: https://code.wireshark.org/review/5337
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  e0349a8   tn5250: fix an endless loop, exit when offset is not incremented
    adds  5451012   ncp2222: initialize buffer in build_expert_data


Summary of changes:
 epan/dissectors/packet-ncp2222.inc |    1 +
 1 file changed, 1 insertion(+)