From: Christophe Jaillet Date: Thu, 16 Jun 2016 05:17:35 +0000 (+0000) Subject: Fix a potential buffer overflow. X-Git-Tag: 2.5.0-alpha~1498 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=162b393417297717e70ba0fbf2ef858e1dd3610a;p=thirdparty%2Fapache%2Fhttpd.git Fix a potential buffer overflow. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1748653 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/sed0.c b/modules/filters/sed0.c index ddc4bfed8e5..a044f647dba 100644 --- a/modules/filters/sed0.c +++ b/modules/filters/sed0.c @@ -588,7 +588,7 @@ jtcommon: command_errf(commands, SEDERR_SMMES, commands->linebuf); return -1; } - if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX]) == NULL) { + if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX-1]) == NULL) { command_errf(commands, SEDERR_FNTL, commands->linebuf); return -1; } @@ -617,7 +617,7 @@ jtcommon: command_errf(commands, SEDERR_SMMES, commands->linebuf); return -1; } - if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX]) == NULL) { + if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX-1]) == NULL) { command_errf(commands, SEDERR_FNTL, commands->linebuf); return -1; }