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] master-2.6 6e12afd: ssl-utils: fix key log read after EOF

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 08 Aug 2018 12:04:26 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6e12afd8cb27b3eaf5c73c6b6523b6da9f1ef1a2
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

6e12afd by Peter Wu (peter@xxxxxxxxxxxxx):

    ssl-utils: fix key log read after EOF
    
    C99 requires fgets to fail once the EOF bit is set, glibc 2.28 started
    implementing this behavior. Clear the EOF bit to avoid all future reads
    from failing. Add another error check while at it.
    
    Change-Id: I1c5f7e190426d29e3bf437c443b09092ed8d2d35
    Fixes: v1.99.0-rc1-1080-ga69a63f5d1 ("ssl: fix SSL keylog file live-capture use case")
    Reviewed-on: https://code.wireshark.org/review/28984
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 4d87743c234c202e810e727d946b578ab38f4e2f)
    Reviewed-on: https://code.wireshark.org/review/29011
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  b8f8759   Another dictionary fix.
     add  6e12afd   ssl-utils: fix key log read after EOF


Summary of changes:
 epan/dissectors/packet-ssl-utils.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)