diff --git a/admin/autoupdater/src/autoupdater.c b/admin/autoupdater/src/autoupdater.c index dcf8829..8d8bc74 100644 --- a/admin/autoupdater/src/autoupdater.c +++ b/admin/autoupdater/src/autoupdater.c @@ -380,10 +380,12 @@ static bool autoupdate(const char *mirror, struct settings *s, int lock_fd) { /* Test the image upgrade (issue #193) */ { + static const char *const exec_builtin = "exec "; static const char *const test_option = " --test "; - char buf[strlen(sysupgrade_path) + strlen(test_option) + strlen(firmware_path) + 1]; - strcpy(buf, sysupgrade_path); + char buf[strlen(exec_builtin) + strlen(sysupgrade_path) + strlen(test_option) + strlen(firmware_path) + 1]; + strcpy(buf, exec_builtin); + strcat(buf, sysupgrade_path); strcat(buf, test_option); strcat(buf, firmware_path);