summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_pngmodule.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-10 14:42:26 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-10 19:17:02 +0000
commit2e2ee0e7f786dbc27a5b85b27d5e91e821069aea (patch)
tree59b2ff786764b32ffa8fa9f80300462971549fff /core/fxcodec/codec/ccodec_pngmodule.cpp
parent21f88ffe5c2c9fc7af9a7bcc4a654ad1008ab17e (diff)
downloadpdfium-2e2ee0e7f786dbc27a5b85b27d5e91e821069aea.tar.xz
Cleanup CGifDecompressor part 2
Change-Id: I9754da8d1bf54b328761ac9d83fcc4a3518b4a73 Reviewed-on: https://pdfium-review.googlesource.com/5230 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_pngmodule.cpp')
-rw-r--r--core/fxcodec/codec/ccodec_pngmodule.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp
index 09bc1ac7e7..5529eae562 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.cpp
+++ b/core/fxcodec/codec/ccodec_pngmodule.cpp
@@ -50,19 +50,6 @@ static void _png_load_bmp_attribute(png_structp png_ptr,
png_get_iCCP(png_ptr, info_ptr, &icc_name, &compress_type, &icc_profile,
&icc_proflen);
#endif
- int bTime = 0;
-#if defined(PNG_tIME_SUPPORTED)
- png_timep t = nullptr;
- png_get_tIME(png_ptr, info_ptr, &t);
- if (t) {
- memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- FXSYS_snprintf((char*)pAttribute->m_strTime,
- sizeof(pAttribute->m_strTime), "%4u:%2u:%2u %2u:%2u:%2u",
- t->year, t->month, t->day, t->hour, t->minute, t->second);
- pAttribute->m_strTime[sizeof(pAttribute->m_strTime) - 1] = 0;
- bTime = 1;
- }
-#endif
#if defined(PNG_TEXT_SUPPORTED)
int i;
FX_STRSIZE len;
@@ -73,14 +60,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr,
for (i = 0; i < num_text; i++) {
len = FXSYS_strlen(text[i].key);
buf = "Time";
- if (!memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
- if (!bTime) {
- memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- memcpy(
- pAttribute->m_strTime, text[i].text,
- std::min(sizeof(pAttribute->m_strTime) - 1, text[i].text_length));
- }
- } else {
+ if (memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
buf = "Author";
if (!memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
pAttribute->m_strAuthor =