summaryrefslogtreecommitdiff
path: root/core/fxcodec/lgif/cgifcontext.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-23 19:07:25 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-23 23:30:17 +0000
commit6f3593c5cdf62915fc086448312671ce1fce5291 (patch)
tree14bb1e913dad31e80db2ae588f531603e93bea4b /core/fxcodec/lgif/cgifcontext.cpp
parenta861a7b4696e0ffd4be73c63d7ed3611e461b1c1 (diff)
downloadpdfium-6f3593c5cdf62915fc086448312671ce1fce5291.tar.xz
Remove longjmp from the Gif module
The Gif module is only using the longjmp as a way to catch errors, so this CL makes it use GifDecodeStatus::Error instead. Change-Id: I9c97e63ed851d2a80e38f1d2cd9e8f297d608cb2 Reviewed-on: https://pdfium-review.googlesource.com/5850 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/lgif/cgifcontext.cpp')
-rw-r--r--core/fxcodec/lgif/cgifcontext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fxcodec/lgif/cgifcontext.cpp b/core/fxcodec/lgif/cgifcontext.cpp
index b7a513c7e8..9c03cffa21 100644
--- a/core/fxcodec/lgif/cgifcontext.cpp
+++ b/core/fxcodec/lgif/cgifcontext.cpp
@@ -33,9 +33,8 @@ CGifContext::CGifContext(CCodec_GifModule* gif_module, char* error_string)
CGifContext::~CGifContext() {}
-void CGifContext::ThrowError(const char* err_msg) {
+void CGifContext::AddError(const char* err_msg) {
strncpy(err_ptr, err_msg, GIF_MAX_ERROR_SIZE - 1);
- longjmp(jmpbuf, 1);
}
void CGifContext::RecordCurrentPosition(uint32_t* cur_pos_ptr) {