From 5de8fbf6454ee386a527b33dbaf532889d5f66e0 Mon Sep 17 00:00:00 2001 From: dongdigua Date: Mon, 25 May 2026 13:12:50 +0800 Subject: [PATCH] fix http jpg streaming pthread stack smashing https://elixir.bootlin.com/musl/v1.2.6/source/src/internal/pthread_impl.h#L197 --- highgui/src/writer_http.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/highgui/src/writer_http.cpp b/highgui/src/writer_http.cpp index 1f308ff2..62827dbd 100644 --- a/highgui/src/writer_http.cpp +++ b/highgui/src/writer_http.cpp @@ -314,8 +314,8 @@ void writer_http_impl::mainloop() // handle client while (1) { - char buf[1024 * 1024]; - client.recv(buf, 1024 * 1024 - 1); + char buf[4096] = {0}; + client.recv(buf, sizeof(buf) - 1); // fprintf(stderr, "%s", buf); // fprintf(stderr, "-------------------------\n");