From 73cc87677ed228d2fa5dfc33e3f1e0a6230e327c Mon Sep 17 00:00:00 2001 From: Saggi Mizrahi Date: Sun, 13 Jan 2013 13:58:57 -0500 Subject: [PATCH] (retrolaunch) Remove VLA Signed-off-by: Saggi Mizrahi --- tools/retrolaunch/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/retrolaunch/main.c b/tools/retrolaunch/main.c index a6c4cf780d..5d6c3c0702 100644 --- a/tools/retrolaunch/main.c +++ b/tools/retrolaunch/main.c @@ -105,8 +105,7 @@ static int get_sha1(const char *path, char *result) { int fd; int rv; - int buff_len = 4096; - unsigned char buff[buff_len]; + unsigned char buff[4096]; SHA1Context sha; fd = open(path, O_RDONLY); @@ -117,7 +116,7 @@ static int get_sha1(const char *path, char *result) SHA1Reset(&sha); rv = 1; while (rv > 0) { - rv = read(fd, buff, buff_len); + rv = read(fd, buff, 4096); if (rv < 0) { close(fd); return -errno;