QLOG: Fix filter lexing
authorHugo Landau <hlandau@openssl.org>
Mon, 29 Jan 2024 12:37:35 +0000 (12:37 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 2 Feb 2024 11:50:30 +0000 (11:50 +0000)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)

ssl/quic/qlog.c

index e084d47ac7c1aa1965cb504e1ac587c0ca9b62cf..6944a4f435d6828b2bcbbfc9560f4a2f6a7d5add 100644 (file)
@@ -155,6 +155,7 @@ void ossl_qlog_free(QLOG *qlog)
     if (qlog == NULL)
         return;
 
+    ossl_json_flush(&qlog->json);
     ossl_json_cleanup(&qlog->json);
     BIO_free_all(qlog->bio);
     OPENSSL_free((char *)qlog->info.title);
@@ -573,7 +574,7 @@ static int lex_extract_to(struct lexer *lex, char c,
         return 0;
 
     *str    = p;
-    *str_l  = term_end - s;
+    *str_l  = s - p;
     lex->p  = ++s;
     return 1;
 }