[vlc-commits] input: stream: Avoid VLA
Hugo Beauzée-Luyssen
git at videolan.org
Fri Dec 11 12:15:51 UTC 2020
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Nov 27 06:19:21 2020 -0800| [3b670ad92de7de94bb9b917e44a31372de4926ea] | committer: Hugo Beauzée-Luyssen
input: stream: Avoid VLA
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b670ad92de7de94bb9b917e44a31372de4926ea
---
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);
More information about the vlc-commits
mailing list