From 3d898dd8f7c7641bb5923edbd9894fef0b62b63d Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 18 Nov 2016 19:03:35 -0800 Subject: [PATCH] MJPEGServer: Fix URI %xx-decoding. --- src/MJPEGServerImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MJPEGServerImpl.cpp b/src/MJPEGServerImpl.cpp index 1e3a9fcc9a..2994ea3410 100644 --- a/src/MJPEGServerImpl.cpp +++ b/src/MJPEGServerImpl.cpp @@ -197,7 +197,7 @@ static bool UnescapeURI(llvm::StringRef str, llvm::SmallVectorImpl& out) { } // are there enough characters left? - if (i + 2 < end) return false; + if (i + 2 >= end) return false; // replace %xx with the corresponding character unsigned val1 = llvm::hexDigitValue(*++i);