[Boost-bugs] [Boost C++ Libraries] #3116: boost GIL doesn't properly handle JPEG errors

Subject: [Boost-bugs] [Boost C++ Libraries] #3116: boost GIL doesn't properly handle JPEG errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-31 23:12:52


#3116: boost GIL doesn't properly handle JPEG errors
-----------------------------------------------+----------------------------
 Reporter: Giel van Schijndel <me_at_mortis.eu> | Owner: hljin
     Type: Patches | Status: new
Milestone: Boost 1.40.0 | Component: GIL
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
-----------------------------------------------+----------------------------
 When an error occurs during the decoding of a JPEG file (specifically its
 header) using jpeg_read_(dimensions|image|view) inside of libjpeg itself
 the program terminates.

 This is because libjpeg uses the `error_exit` handler from the current
 `jpeg_error_mgr` to signal an error. The default `error_exit` handler
 simply prints a message to stderr and calls `exit(EXIT_FAILURE)`. However,
 in order to properly handle this error one needs to override this
 `error_exit handler`. Attached patch does just that, using the same error
 message, though instead, it uses that message as a description for an
 `io_error(const char* desc)` generated exception
 (`std::ios_base::failure`).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3116>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC