[PATCH] stream_ReadLine: increase line length limit

Pierre Ynard linkfanel at yahoo.fr
Mon Jul 20 13:11:34 CEST 2020


Very long lines are occasionally encountered in text web resources such
as HTML, JSON or other API data. This bumps the hardcoded limit from
200 kB to 4 MB, which should be sufficient to support more than most of
them, but still reasonable to prevent any issue.

Fixes #24957

This is relevant for fixing YouTube playback in 3.0


diff --git a/src/input/stream.c b/src/input/stream.c
index 35c5a04..57b04c1 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -183,7 +183,7 @@ stream_t *(vlc_stream_NewMRL)(vlc_object_t* parent, const char* mrl )
  * \return A pointer to the allocated output string. You need to free this when you are done.
  */
 #define STREAM_PROBE_LINE 2048
-#define STREAM_LINE_MAX (2048*100)
+#define STREAM_LINE_MAX (2048*2048)
 char *vlc_stream_ReadLine( stream_t *s )
 {
     stream_priv_t *priv = (stream_priv_t *)s;


-- 
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