1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-09-03 01:21:16 +03:00

main.c: fix another potential buffer overflow in strncat() call

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf
2014-05-13 16:45:22 +02:00
parent 91f7daa9ed
commit 2d8fec839c

View File

@@ -504,7 +504,7 @@ static void set_absolute_path(char *options[], const char *option_name,
path[sizeof(path)-1] = 0;
}
strncat(path, "/", sizeof(path) - 1);
strncat(path, "/", sizeof(path) - strlen(path) - 1);
strncat(path, option_value, sizeof(path) - strlen(path) - 1);
/* Absolutize the path, and set the option */