From b8c30d9591850c3c0c1f9f8b7e15e76ea5517375 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 4 Jul 2013 16:43:27 +0200 Subject: [PATCH] Don't go beyond end of string for quoted literals --- src/filter_http_rewrite.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index 5e3cfab..97c0755 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -636,6 +636,8 @@ void yf::HttpRewrite::Content::quoted_literal( { if (cp[-1] != '\\' && *cp == m) break; + if (*cp == '\n') + break; cp++; } if (!*cp) -- 1.7.10.4