1 Star 0 Fork 20

wangchen/exiv2

forked from src-openEuler/exiv2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2019-13113.patch 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 10:38 . Package init
Backported of:
From 7798ae25574425271305fffe85de77bec8df03f1 Mon Sep 17 00:00:00 2001
From: Kevin Backhouse <[email protected]>
Date: Wed, 15 May 2019 10:12:02 +0100
Subject: [PATCH] Throw an exception if the data location is invalid. (#842)
diff --git a/src/crwimage.cpp b/src/crwimage.cpp
index 9225ce5..5ccf3b1 100644
--- a/src/crwimage.cpp
+++ b/src/crwimage.cpp
@@ -738,12 +738,11 @@ namespace Exiv2 {
DataLocId CiffComponent::dataLocation(uint16_t tag)
{
- DataLocId di = invalidDataLocId;
switch (tag & 0xc000) {
- case 0x0000: di = valueData; break;
- case 0x4000: di = directoryData; break;
+ case 0x0000: return valueData;
+ case 0x4000: return directoryData;
+ default: throw Error(kerCorruptedMetadata);
}
- return di;
} // CiffComponent::dataLocation
/*!
diff --git a/src/crwimage_int.hpp b/src/crwimage_int.hpp
index 5588ae5..1478c82 100644
--- a/src/crwimage_int.hpp
+++ b/src/crwimage_int.hpp
@@ -78,7 +78,6 @@ namespace Exiv2 {
//! Type to identify where the data is stored in a directory
enum DataLocId {
- invalidDataLocId,
valueData,
directoryData,
lastDataLocId
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangchen2020/exiv2.git
[email protected]:wangchen2020/exiv2.git
wangchen2020
exiv2
exiv2
master

搜索帮助