exiv2/exiv2-CVE-2017-18005_2.patch
2019-12-25 15:45:26 +08:00

28 lines
1.1 KiB
Diff

From 85e8a48bc2da364869ffd1aaeabc09edcfa03067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= <piponazo@gmail.com>
Date: Tue, 19 Dec 2017 19:54:17 +0100
Subject: [PATCH] Move condition in if statement to discard work earlier
---
src/actions.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/actions.cpp b/src/actions.cpp
index 3125cf54f..fea22d373 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -708,10 +708,9 @@ namespace Action {
if (!first) std::cout << " ";
first = false;
- if ( Params::instance().binary_
- && ( md.typeId() == Exiv2::undefined
+ if (md.size() > 128 && Params::instance().binary_ && (
+ md.typeId() == Exiv2::undefined
|| md.typeId() == Exiv2::unsignedByte
- || md.typeId() == Exiv2::signedByte)
- && md.size() > 128) {
+ || md.typeId() == Exiv2::signedByte)) {
std::cout << _("(Binary value suppressed)") << std::endl;
return true;
}