[vlc-commits] httpd: fix crash on allocation failure
Rémi Denis-Courmont
git at videolan.org
Tue Jan 12 14:18:56 UTC 2021
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 22 18:53:26 2020 +0200| [6151df07a69fb18dc93fea4527d959c0ba7b5380] | committer: Thomas Guillem
httpd: fix crash on allocation failure
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6151df07a69fb18dc93fea4527d959c0ba7b5380
---
src/network/httpd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 2a893ba4ad..5a8aea918d 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -2037,6 +2037,12 @@ static void httpdLoop(httpd_host_t *host)
cl = httpd_ClientNew(sk, now);
+ if (unlikely(cl == NULL))
+ {
+ vlc_tls_Close(sk);
+ continue;
+ }
+
if (host->p_tls != NULL)
cl->i_state = HTTPD_CLIENT_TLS_HS_OUT;
More information about the vlc-commits
mailing list