]> granicus.if.org Git - apache/commitdiff
Fix a potential buffer overflow.
authorChristophe Jaillet <jailletc36@apache.org>
Thu, 16 Jun 2016 05:17:35 +0000 (05:17 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Thu, 16 Jun 2016 05:17:35 +0000 (05:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1748653 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/sed0.c

index ddc4bfed8e52476551af5ca9e0b333d1127d6eb8..a044f647dba04660e9cc056b919db686b8fdb445 100644 (file)
@@ -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;
             }