diff options
author | Nicolas Pena <npm@chromium.org> | 2017-05-12 14:36:06 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-12 18:56:06 +0000 |
commit | ef73cf5838ab3a902872d9fc57a90621cc3d7f21 (patch) | |
tree | eed3efc2f90742ea509b39ab529f23f8c77b8443 /core/fxcodec/lgif/cgifcontext.cpp | |
parent | 2199ab8e048ae19ee3ae01afe640ce3a66092a00 (diff) | |
download | pdfium-ef73cf5838ab3a902872d9fc57a90621cc3d7f21.tar.xz |
Rename ErrorData and fix potential leakchromium/3100chromium/3099
This CL fixes a leak that can be caused by a longjmp in ErrorData. The method
is renamed to express the fact that it includes such, and a followup should
remove the jmps altogether.
Bug: chromium:721488
Change-Id: Iefcc82a77a30ff77b7973b05611440a8d5bf275e
Reviewed-on: https://pdfium-review.googlesource.com/5450
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcodec/lgif/cgifcontext.cpp b/core/fxcodec/lgif/cgifcontext.cpp index aa2aba6075..b7a513c7e8 100644 --- a/core/fxcodec/lgif/cgifcontext.cpp +++ b/core/fxcodec/lgif/cgifcontext.cpp @@ -33,7 +33,7 @@ CGifContext::CGifContext(CCodec_GifModule* gif_module, char* error_string) CGifContext::~CGifContext() {} -void CGifContext::ErrorData(const char* err_msg) { +void CGifContext::ThrowError(const char* err_msg) { strncpy(err_ptr, err_msg, GIF_MAX_ERROR_SIZE - 1); longjmp(jmpbuf, 1); } |