File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ with the -yuv option.
2525[4] Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast
2626path" of libjpeg-turbo's Huffman decoder to read from uninitialized memory.
2727
28+ [5] Added libjpeg-turbo version and build information to the global string
29+ table of the libjpeg and TurboJPEG API libraries. This is a common practice in
30+ other infrastructure libraries, such as OpenSSL and libpng, because it makes it
31+ easy to examine an application binary and determine which version of the
32+ library the application was linked against.
33+
2834
29351.4.2
3036=====
Original file line number Diff line number Diff line change 55 * Copyright (C) 1991-1997, Thomas G. Lane.
66 * Modified 2003-2010 by Guido Vollbeding.
77 * libjpeg-turbo Modifications:
8- * Copyright (C) 2010, D. R. Commander.
8+ * Copyright (C) 2010, 2016, D. R. Commander.
99 * For conditions of distribution and use, see the accompanying README file.
1010 *
1111 * This file contains master control logic for the JPEG compressor.
1818#include "jinclude.h"
1919#include "jpeglib.h"
2020#include "jpegcomp.h"
21+ #include "jconfigint.h"
2122
2223
2324/* Private state */
@@ -37,6 +38,16 @@ typedef struct {
3738 int total_passes ; /* total # of passes needed */
3839
3940 int scan_number ; /* current index in scan_info[] */
41+
42+ /*
43+ * This is here so we can add libjpeg-turbo version/build information to the
44+ * global string table without introducing a new global symbol. Adding this
45+ * information to the global string table allows one to examine a binary
46+ * object and determine which version of libjpeg-turbo it was built from or
47+ * linked against.
48+ */
49+ const char * jpeg_version ;
50+
4051} my_comp_master ;
4152
4253typedef my_comp_master * my_master_ptr ;
@@ -622,4 +633,6 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
622633 master -> total_passes = cinfo -> num_scans * 2 ;
623634 else
624635 master -> total_passes = cinfo -> num_scans ;
636+
637+ master -> jpeg_version = PACKAGE_NAME " version " VERSION " (build " BUILD ")" ;
625638}
You can’t perform that action at this time.
0 commit comments