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);