mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
Fix an off-by-one error where a realloc(3) call doesn't allocate space
for nul-termination (Aravind Gottipati - 1729692) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1727 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
f71de78952
commit
61e0cbb7f4
1 changed files with 1 additions and 1 deletions
|
|
@ -1101,7 +1101,7 @@ redir (char *pos, char *status_line)
|
|||
pos += i;
|
||||
pos += strspn (pos, " \t\r\n");
|
||||
|
||||
url = realloc (url, strcspn (pos, "\r\n"));
|
||||
url = realloc (url, strcspn (pos, "\r\n") + 1);
|
||||
if (url == NULL)
|
||||
die (STATE_UNKNOWN, _("HTTP UNKNOWN - could not allocate url\n"));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue