]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/squid/SQUID-2018_1.patch
Apache: Update to 2.4.34
[ipfire-2.x.git] / src / patches / squid / SQUID-2018_1.patch
CommitLineData
101765c0
MF
1commit eb2db98a676321b814fc4a51c4fb7928a8bb45d9 (refs/remotes/origin/v3.5)
2Author: Amos Jeffries <yadij@users.noreply.github.com>
3Date: 2018-01-19 13:54:14 +1300
4
5 ESI: make sure endofName never exceeds tagEnd (#130)
6
7diff --git a/src/esi/CustomParser.cc b/src/esi/CustomParser.cc
8index d86d2d3..db634d9 100644
9--- a/src/esi/CustomParser.cc
10+++ b/src/esi/CustomParser.cc
11@@ -121,7 +121,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool
12
13 char * endofName = strpbrk(const_cast<char *>(tag), w_space);
14
15- if (endofName > tagEnd)
16+ if (!endofName || endofName > tagEnd)
17 endofName = const_cast<char *>(tagEnd);
18
19 *endofName = '\0';
20@@ -214,7 +214,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool
21
22 char * endofName = strpbrk(const_cast<char *>(tag), w_space);
23
24- if (endofName > tagEnd)
25+ if (!endofName || endofName > tagEnd)
26 endofName = const_cast<char *>(tagEnd);
27
28 *endofName = '\0';