[vlc-commits] stream_ReadLine: log error when failing on line too long

Pierre Ynard git at videolan.org
Tue Oct 27 09:10:16 CET 2020


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Oct 27 08:57:08 2020 +0100| [4a0582e475d5f0d3427f2014ae51f47d6994dfd3] | committer: Pierre Ynard

stream_ReadLine: log error when failing on line too long

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a0582e475d5f0d3427f2014ae51f47d6994dfd3
---

 src/input/stream.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index b39e5bbd44..8900fad2dd 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 )



More information about the vlc-commits mailing list