[vlc-devel] [PATCH 5/8] stream_ReadLine: log error when failing on line too long

Pierre Ynard linkfanel at yahoo.fr
Wed Oct 21 05:27:52 CEST 2020


diff --git a/src/input/stream.c b/src/input/stream.c
index b26188c..c3ce7a9 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -336,7 +336,11 @@ char *vlc_stream_ReadLine( stream_t *s )
         i_read += i_data;
 
         if( i_read >= STREAM_LINE_MAX )
-            goto error; /* line too long */
+        {
+            msg_Err( s, "line too long, exceeding %zu bytes",
+                     (size_t) STREAM_LINE_MAX );
+            goto error;
+        }
     }
 
     if( i_read > 0 )
-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."


More information about the vlc-devel mailing list