From 58931e1d30e518e166c2a6133315d56b4d273ad2 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 25 Dec 2016 01:45:35 -0800 Subject: [PATCH] Be even more permissive on valid JPEG formats. --- src/JpegUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JpegUtil.cpp b/src/JpegUtil.cpp index 0e618e9bfb..191b3abe70 100644 --- a/src/JpegUtil.cpp +++ b/src/JpegUtil.cpp @@ -56,13 +56,13 @@ bool IsJpeg(llvm::StringRef data) { auto bytes = data.bytes_begin(); if (bytes[0] != 0xff || bytes[1] != 0xd8) return false; - +#if 0 // Check for valid JPEG header (null terminated JFIF) if (bytes[2] == 0xff && bytes[3] == 0xe0) { if (data.substr(6, 4) != "JFIF" || bytes[10] != 0x00) return false; } - +#endif return true; }