ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-commits: [Wireshark-commits] lts-1.8.2 4028d5b: ncp2222: initialize buffer in build_exper

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 16 Nov 2014 21:46:06 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=4028d5ba2714f7270190f8f86ead2412975fc878
Submitter: Balint Reczey (balint@xxxxxxxxxxxxxxx)
Changed: branch: lts-1.8.2
Repository: wireshark

Commits:

4028d5b 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>
    (cherry picked from commit b726d17816e0af213a554b6b4138e432ac002dd8)
    Reviewed-on: https://code.wireshark.org/review/5353
    Reviewed-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
    

Actions performed:

    from  170b563   tn5250: fix an endless loop, exit when offset is not incremented
    adds  4028d5b   ncp2222: initialize buffer in build_expert_data


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