From 303924c343778f15d80be7b61dc4c927b91eafd9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Jan 2015 12:11:37 +0100 Subject: stream: reject overly long URLs --- stream/stream.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stream') diff --git a/stream/stream.c b/stream/stream.c index 1e1c5eee4e..4759a01abe 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -348,6 +349,9 @@ struct stream *stream_create(const char *url, int flags, struct stream *s = NULL; assert(url); + if (strlen(url) > INT_MAX / 8) + goto done; + // Open stream proper bool unsafe = false; for (int i = 0; stream_list[i]; i++) { -- cgit v1.2.3