From 2ea57237cee18ce017d5770fab3f0fbecc63714e Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 15 Nov 2012 23:26:23 +0100 Subject: [PATCH] Correct out-of-bounds array access in basic_ncsa_auth helper --- helpers/basic_auth/NCSA/basic_ncsa_auth.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc index 1425db85d9..7ce42f8b00 100644 --- a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc +++ b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc @@ -85,7 +85,7 @@ read_passwd_file(const char *passwdfile) exit(1); } unsigned int lineCount = 0; - buf[sizeof(buf)] = '\0'; + buf[HELPER_INPUT_BUFFER-1] = '\0'; while (fgets(buf, sizeof(buf)-1, f) != NULL) { ++lineCount; if ((buf[0] == '#') || (buf[0] == ' ') || (buf[0] == '\t') || -- 2.47.3