[vlc-devel] [PATCH 03/12] input: stream: Avoid VLA
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Tue Dec 8 15:19:07 CET 2020
---
src/input/stream.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/input/stream.c b/src/input/stream.c
index 77c8cf0e4c..b07c3b451d 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -434,8 +434,8 @@ static ssize_t vlc_stream_ReadRaw(stream_t *s, void *buf, size_t len)
if (unlikely(len == 0))
return 0;
- char dummy[(len <= 256 ? len : 256)];
- ret = s->pf_read(s, dummy, sizeof (dummy));
+ char dummy[256];
+ ret = s->pf_read(s, dummy, len <= 256 ? len : 256);
}
else
ret = s->pf_read(s, buf, len);
--
2.29.2
More information about the vlc-devel
mailing list