From dba79997f91742433707cf775318a5f3dddaa663 Mon Sep 17 00:00:00 2001 From: dracoding Date: Wed, 18 Oct 2023 20:17:59 +0800 Subject: [PATCH] Fix: read data from remote url to region maybe out of bounds when the length is more than MAX_NAME_LEN Signed-off-by: dracoding --- source/sysak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sysak.c b/source/sysak.c index 67e0db5d..db971361 100644 --- a/source/sysak.c +++ b/source/sysak.c @@ -244,7 +244,7 @@ static bool get_region(char *region) printf("cmd line end\n"); return 0; } - fread(region, 1,512, res); + fread(region, 1, MAX_NAME_LEN, res); pclose(res); return 0; } -- Gitee