From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6596 :
authorJeff Morriss <jeff.morriss.ws@gmail.com>
Tue, 24 Sep 2013 00:31:49 +0000 (00:31 -0000)
committerJeff Morriss <jeff.morriss.ws@gmail.com>
Tue, 24 Sep 2013 00:31:49 +0000 (00:31 -0000)
Allow reading SSL keylog files with carriage returns.

svn path=/trunk/; revision=52197

epan/dissectors/packet-ssl-utils.c

index da3ee6683a95601a54dbba34a7e97f991be3446b..11a0fc80b6b960c8918a047c1c7ce1ef26b0877b 100644 (file)
@@ -4194,6 +4194,10 @@ ssl_keylog_lookup(SslDecryptSession* ssl_session,
             line[bytes_read - 1] = 0;
             bytes_read--;
         }
             line[bytes_read - 1] = 0;
             bytes_read--;
         }
+        if (bytes_read > 0 && line[bytes_read - 1] == '\r') {
+            line[bytes_read - 1] = 0;
+            bytes_read--;
+        }
 
         ssl_debug_printf("  checking keylog line: %s\n", line);
 
 
         ssl_debug_printf("  checking keylog line: %s\n", line);