debian/0000755000000000000000000000000013317474265007202 5ustar debian/libjpeg-turbo-test.lintian-overrides0000644000000000000000000000012112175235213016263 0ustar binary-without-manpage usr/bin/tjbench binary-without-manpage usr/bin/tjunittest debian/source.lintian-overrides0000644000000000000000000000006212175234634014053 0ustar package-needs-versioned-debhelper-build-depends 9 debian/rules0000755000000000000000000000531712175225105010254 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # for architecture dependent variables and changelog vars vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) DPKG_VARS := $(shell dpkg-architecture) DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) export DEB_LDFLAGS_MAINT_STRIP=-Wl,-Bsymbolic-functions CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS) ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -Wall endif ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CC = gcc else CC = $(DEB_HOST_GNU_TYPE)-gcc endif %: dh $@ --list-missing --parallel --with autoreconf override_dh_auto_configure: dh_auto_configure -v -- --with-jpeg8 CFLAGS="$(CFLAGS)" override_dh_auto_build: dh_auto_build -v $(MAKE) -C debian/extra CC=$(CC) CFLAGS="$(CFLAGS) -Wall" override_dh_install: $(MAKE) -C debian/extra install prefix=/usr DESTDIR=$(CURDIR)/debian/tmp : # fix jconfig.h rm -f debian/tmp/usr/include/jconfig.h mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH) sed -e "s/#\(undef\|define\) HAVE_\(LOCALE\|\(STD\(DEF\|LIB\)\)\)_H 1//g" \ jconfig.h > debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/jconfig.h dh_install override_dh_installchangelogs: dh_installchangelogs -plibjpeg-turbo8-dev change.log dh_installchangelogs -Nlibjpeg-turbo8-dev override_dh_strip: dh_strip -plibjpeg-turbo8 --dbg-package=libjpeg-turbo8-dbg dh_strip -Nlibjpeg-turbo8 libjpeg-turbo8-dbg override_dh_makeshlibs: : # keep the original libjpeg symbol version dh_makeshlibs -- -v8c : # ... and mark libjpeg-turbo only symbols with a different version sed -i "$$(for i in $$(cat debian/libjpeg-turbo-only.symbols); do echo "/^ $$i/s/8c$$/8c-2ubuntu5~/;"; done)" debian/libjpeg-turbo8/DEBIAN/symbols override_dh_auto_test: override_dh_auto_clean: dh_auto_clean $(MAKE) -C debian/extra clean rm -f simd/jsimdcfg.inc deb_source := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p') svn_rev := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*[+~]svn([0-9]+).*,\1,p') upstream_version := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') .PHONY: get-orig-source get-orig-source: rm -rf $(deb_source)-$(upstream_version).orig rm -f $(deb_source)-$(upstream_version).orig.tar.gz svn -q export -r $(svn_rev) https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo/trunk \ $(deb_source)-$(upstream_version).orig GZIP=--best tar -cz --owner root --group root --mode a+rX \ -f $(deb_source)_$(upstream_version).orig.tar.gz \ $(deb_source)-$(upstream_version).orig rm -r $(deb_source)-$(upstream_version).orig debian/control0000644000000000000000000000632612175237435010611 0ustar Source: libjpeg-turbo Priority: optional Section: graphics Maintainer: Ubuntu Developers Uploaders: Tom Gall , Fathi Boudra Build-Depends: debhelper (>= 8.1.3), dh-autoreconf, nasm [amd64 i386], quilt Standards-Version: 3.9.4 Vcs-Bzr: lp:libjpeg-turbo Homepage: http://libjpeg-turbo.virtualgl.org/ Package: libjpeg-turbo8-dev Architecture: any Section: libdevel Multi-Arch: same Depends: libc-dev, libjpeg-turbo8 (= ${binary:Version}), ${misc:Depends} Conflicts: libjpeg62-dev, libjpeg7-dev Replaces: libjpeg62-dev, libjpeg7-dev, libjpeg8-dev (<< 8c-2ubuntu5) Provides: libjpeg-dev Description: Development files for the IJG JPEG library The Independent JPEG Group's JPEG library is a library for handling JPEG files. . This package contains the static library, headers and documentation. Package: libjpeg-turbo8 Architecture: any Multi-Arch: same Section: libs Pre-Depends: multiarch-support Depends: ${misc:Depends}, ${shlibs:Depends} Breaks: libjpeg8 (<< 8c-2ubuntu5) Replaces: libjpeg8 (<< 8c-2ubuntu5) Description: IJG JPEG compliant runtime library. Runtime library supporting the Independent JPEG Group's standard for JPEG files. . This package contains the shared library which is a drop in replacement for libjpeg8, which has better performance than standard libjpeg by use of SIMD and other optimizations. Package: libturbojpeg Architecture: any Multi-Arch: same Section: libs Pre-Depends: multiarch-support Depends: ${misc:Depends}, ${shlibs:Depends} Replaces: libjpeg-turbo8 (<< 1.1.90+svn722-1ubuntu6) Description: IJG JPEG compliant runtime library. Runtime library supporting the Independent JPEG Group's standard for JPEG files. . This package contains the libturbojpeg.so library, used by turboVNC and other users of the past TurboJPEG library. Package: libjpeg-turbo-progs Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Replaces: libjpeg-progs (<< 8c-2ubuntu5) Provides: libjpeg-progs Description: Programs for manipulating JPEG files This package contains programs for manipulating JPEG files: cjpeg/djpeg: convert to/from the JPEG file format rdjpgcom/wrjpgcom: read/write comments in JPEG files jpegtran: lossless transformations of JPEG files tjbench: a simple JPEG benchmarking tool Package: libjpeg-turbo8-dbg Architecture: any Section: debug Priority: extra Depends: libjpeg-turbo8 (= ${binary:Version}), ${misc:Depends} Replaces: libjpeg-turbo-dbg (<< 1.1.90+svn722-1ubuntu6), libjpeg62-dbg, libjpeg7-dbg Description: Debugging symbols for the libjpeg-turbo library An optimized implementation of the Independent JPEG Group's JPEG library is a library for handling JPEG files. . This package contains the debugging symbols for libjpeg-turbo. Package: libjpeg-turbo-test Architecture: any Priority: extra Section: debug Depends: libturbojpeg (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Replaces: libjpeg-test (<< 1.1.90+svn722-1ubuntu6) Description: Program for benchmarking and testing libjpeg-turbo This package contains tjunittest and tjbench. tjunittest tests the basic functionality of the library and data files for performing those tests. tjbench runs some benchmarks. debian/watch0000644000000000000000000000010211774332764010226 0ustar version=3 http://sf.net/libjpeg-turbo/libjpeg-turbo-(.+)\.tar\.gz debian/libturbojpeg.postrm0000755000000000000000000000011211774332764013137 0ustar #!/bin/sh set -e if [ "$1" = "remove" ]; then ldconfig fi #DEBHELPER# debian/libjpeg-turbo-only.symbols0000644000000000000000000000056511774332764014350 0ustar LIBJPEGTURBO_8.0@LIBJPEGTURBO_8.0 auxv@LIBJPEG_8.0 init_simd@LIBJPEG_8.0 jinit_phuff_decoder@LIBJPEG_8.0 jinit_phuff_encoder@LIBJPEG_8.0 jpeg_fill_bit_buffer@LIBJPEG_8.0 jpeg_gen_optimal_table@LIBJPEG_8.0 jpeg_huff_decode@LIBJPEG_8.0 jpeg_make_c_derived_tbl@LIBJPEG_8.0 jpeg_make_d_derived_tbl@LIBJPEG_8.0 jpeg_simd_cpu_support@LIBJPEG_8.0 libjpeg_general_init@LIBJPEG_8.0 debian/patches/0000755000000000000000000000000013317473332010623 5ustar debian/patches/CVE-2013-6629.patch0000644000000000000000000000200112243670410013232 0ustar Description: fix information disclosure via uninitialized memory in the get_sos function Origin: vendor, http://git.chromium.org/gitweb/?p=chromium/deps/libjpeg_turbo.git;a=commit;h=2285c50bcd51dd999d80b99b30ce9aef9fb80833 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1252912 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729873 Index: libjpeg-turbo-1.3.0/jdmarker.c =================================================================== --- libjpeg-turbo-1.3.0.orig/jdmarker.c 2013-11-22 09:57:00.959257674 -0500 +++ libjpeg-turbo-1.3.0/jdmarker.c 2013-11-22 09:57:00.955257674 -0500 @@ -348,6 +348,12 @@ TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, compptr->dc_tbl_no, compptr->ac_tbl_no); + + /* This CSi (cc) should differ from the previous CSi */ + for (ci = 0; ci < i; ci++) { + if (cinfo->cur_comp_info[ci] == compptr) + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + } } /* Collect the additional scan parameters Ss, Se, Ah/Al. */ debian/patches/series0000644000000000000000000000031513317473332012037 0ustar # FixLibraryStartup.patch install-tjunittest.patch add-copying-for-debian-dir.patch CVE-2013-6629.patch CVE-2013-6630.patch CVE-2014-9092.patch CVE-2016-3616.patch CVE-2018-1152.patch CVE-2018-11212.patch debian/patches/CVE-2018-1152.patch0000644000000000000000000000475513317473114013250 0ustar Backport of: From 43e84cff1bb2bd8293066f6ac4eb0df61ddddbc6 Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 12 Jun 2018 20:27:00 -0500 Subject: [PATCH] tjLoadImage(): Fix FPE triggered by malformed BMP In rdbmp.c, it is necessary to guard against 32-bit overflow/wraparound when allocating the row buffer, because since BMP files have 32-bit width and height fields, the value of biWidth can be up to 4294967295. Specifically, if biWidth is 1073741824 and cinfo->input_components = 4, then the samplesperrow argument in alloc_sarray() would wrap around to 0, and a division by zero error would occur at line 458 in jmemmgr.c. If biWidth is set to a higher value, then samplesperrow would wrap around to a small number, which would likely cause a buffer overflow (this has not been tested or verified.) --- ChangeLog.md | 5 +++++ rdbmp.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) #diff --git a/ChangeLog.md b/ChangeLog.md #index ba400d92a..ade31c535 100644 #--- a/ChangeLog.md #+++ b/ChangeLog.md #@@ -30,6 +30,11 @@ would produce a "Bogus message code" error message if the underlying bitmap and # PPM readers/writers threw an error that was specific to the readers/writers # (as opposed to a general libjpeg API error.) # #+4. Fixed an issue whereby a specially-crafted malformed BMP file, one in which #+the header specified an image width of 1073741824 pixels, would trigger a #+floating point exception (division by zero) in the `tjLoadImage()` function #+when attempting to load the BMP file into a 4-component image buffer. #+ # # 1.5.90 (2.0 beta1) # ================== Index: libjpeg-turbo-1.3.0/rdbmp.c =================================================================== --- libjpeg-turbo-1.3.0.orig/rdbmp.c 2018-07-05 15:49:08.219297776 -0400 +++ libjpeg-turbo-1.3.0/rdbmp.c 2018-07-05 15:49:08.215297770 -0400 @@ -432,6 +432,12 @@ start_input_bmp (j_compress_ptr cinfo, c progress->total_extra_passes++; /* count file input as separate pass */ } + /* Ensure that biWidth * cinfo->input_components doesn't exceed the maximum + value of the JDIMENSION type. This is only a danger with BMP files, since + their width and height fields are 32-bit integers. */ + if ((unsigned long long)biWidth * + (unsigned long long)cinfo->input_components > 0xFFFFFFFFULL) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); /* Allocate one-row buffer for returned data */ source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE, debian/patches/CVE-2013-6630.patch0000644000000000000000000000155012243670407013240 0ustar Description: fix information disclosure via uninitialized memory in the get_dht function Origin: vendor, http://git.chromium.org/gitweb/?p=chromium/deps/libjpeg_turbo.git;a=commit;h=32cab49bd4cb1ce069a435fd75f9439c34ddc6f8 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1252912 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729873 Index: libjpeg-turbo-1.3.0/jdmarker.c =================================================================== --- libjpeg-turbo-1.3.0.orig/jdmarker.c 2013-11-22 09:57:09.623257896 -0500 +++ libjpeg-turbo-1.3.0/jdmarker.c 2013-11-22 09:57:09.615257896 -0500 @@ -471,6 +471,7 @@ for (i = 0; i < count; i++) INPUT_BYTE(cinfo, huffval[i], return FALSE); + MEMZERO(&huffval[count], (256 - count) * SIZEOF(UINT8)); length -= count; if (index & 0x10) { /* AC table definition */ debian/patches/add-copying-for-debian-dir.patch0000644000000000000000000006337412175235014016631 0ustar Description: add LGPL2.1 license for debian dir --- COPYING | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) --- /dev/null +++ b/COPYING @@ -0,0 +1,167 @@ +This LGPL License ONLY applies to the contents of the Debian directory and specifically excludes the contents of the debian/patches directory. + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] + +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. + +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + Copyright (C) + +This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice + +That's all there is to it! debian/patches/FixLibraryStartup.patch0000644000000000000000000003604511774332764015322 0ustar diff -uNr -x .bzr libjpeg-turbo-1.1.90+svn702/Makefile.am libjpeg-turbo.now/Makefile.am --- libjpeg-turbo-1.1.90+svn702/Makefile.am 2011-05-26 10:45:06.000000000 +0000 +++ libjpeg-turbo.now/Makefile.am 2011-09-22 18:25:08.000000000 +0000 @@ -7,7 +7,7 @@ HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h -libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \ +libjpeg_la_SOURCES = $(HDRS) jlibinit.c jcapimin.c jcapistd.c jccoefct.c jccolor.c \ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \ jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ diff -uNr -x .bzr libjpeg-turbo-1.1.90+svn702/jlibinit.c libjpeg-turbo.now/jlibinit.c --- libjpeg-turbo-1.1.90+svn702/jlibinit.c 1970-01-01 00:00:00.000000000 +0000 +++ libjpeg-turbo.now/jlibinit.c 2011-09-22 18:25:08.000000000 +0000 @@ -0,0 +1,149 @@ +/* + * jlibinit.c + * + * Copyright 2011 Tom Gall for Linaro Limited + * + * This file is for library initialization + * Alg notes: + * At the time the library is loaded, libjpeg_general_init is called + * this will run before main, in the case that the library is NOT + * loaded via dlopen + * libjpeg_general_init will call libjpeg_arch_specific_init which + * if there is work to do should be implemented by each architecture + * otherwise the empty stub will be called. + * + * Example: In the case of arm, we want to query the auxv to + * determine if neon hardware is present. Further if present + * functional pointers can be setup such that the simd versions + * will be used. + */ + +#include +#include +#include +#include +#include + +#include "jinclude.h" +#include "jpeglib.h" +#include "jsimd.h" + +#if defined(__linux__) || defined(__APPLE__) +LOCAL(void) libjpeg_arch_specific_init(void); + +GLOBAL(void __attribute__ ((constructor))) libjpeg_general_init(void); + +#if !defined(__APPLE__) +volatile ElfW(auxv_t) *auxv = NULL; + +LOCAL(ElfW(auxv_t) *)get_auxv(void) +{ + FILE *auxv_f; + ElfW(auxv_t) auxv_struct; + int i = 0; + + if(auxv == NULL) { + auxv_f = fopen("/proc/self/auxv", "r"); + + if(auxv_f == 0) { + perror("Error opening file for reading"); + return 0; + } + auxv =(ElfW(auxv_t) *)malloc(getpagesize()); + + do + { + fread(&auxv_struct, sizeof(ElfW(auxv_t)), 1, auxv_f); + auxv[i] = auxv_struct; + i++; + } while(auxv_struct.a_type != AT_NULL); + } + return auxv; +} +#else + +/* For OSes without an auxv implementation + */ +LOCAL(ElfW(auxv_t) *)get_auxv(void) +{ +} + +#endif /* if not on apple */ + +/* + * Runs immediately after library load (and before main() unless + * dlopen is used. + */ +GLOBAL(void __attribute__ ((constructor))) libjpeg_general_init(void) +{ + // Architecture independent library init + + get_auxv(); + + // call to arch specific init + libjpeg_arch_specific_init(); +} + +#if defined(__arm__) || defined(__i386__) + +LOCAL(void) libjpeg_arch_specific_init(void) +{ + + init_simd(); + +} +#elif defined(__x86_64__) + +LOCAL(void) libjpeg_arch_specific_init(void) +{ + +} + +#else + +/* + * empty stub for architectures that don't define an arch specific + * init routine. + */ +LOCAL(void) libjpeg_arch_specific_init(void) +{ + +} + +#endif /* __arch__ */ + + + +#elif defined(_WIN32) /* Windows */ + +GLOBAL (BOOL) WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, + LPVOID lpReserved) +{ + switch(fdwReason) { + case DLL_PROCESS_ATTACH: + // call to arch specific init + libjpeg_arch_specific_init(); + break + case DLL_PROCESS_DETACH: + break + } + + return (TRUE); +} + +#if defined(__i386__) + +LOCAL(void) libjpeg_arch_specific_init(void) +{ + + init_simd(); + +} +#elif defined(__x86_64__) + +LOCAL(void) libjpeg_arch_specific_init(void) +{ + +} +#endif /* arch for Windows */ +#endif /* __linux__ __APPLE__ */ diff -uNr -x .bzr libjpeg-turbo-1.1.90+svn702/jsimd.h libjpeg-turbo.now/jsimd.h --- libjpeg-turbo-1.1.90+svn702/jsimd.h 2011-02-18 20:43:04.000000000 +0000 +++ libjpeg-turbo.now/jsimd.h 2011-09-22 18:25:08.000000000 +0000 @@ -37,6 +37,8 @@ #define jsimd_h2v1_merged_upsample jSH2V1MUp #endif /* NEED_SHORT_EXTERNAL_NAMES */ + +EXTERN(void) init_simd JPP((void)); EXTERN(int) jsimd_can_rgb_ycc JPP((void)); EXTERN(int) jsimd_can_rgb_gray JPP((void)); EXTERN(int) jsimd_can_ycc_rgb JPP((void)); diff -uNr -x .bzr libjpeg-turbo-1.1.90+svn702/simd/jsimd_arm.c libjpeg-turbo.now/simd/jsimd_arm.c --- libjpeg-turbo-1.1.90+svn702/simd/jsimd_arm.c 2011-08-22 13:48:01.000000000 +0000 +++ libjpeg-turbo.now/simd/jsimd_arm.c 2011-09-22 18:25:08.000000000 +0000 @@ -15,6 +15,13 @@ * Based on the stubs from 'jsimd_none.c' */ +#include +#include +#include +#include +#include +#include + #define JPEG_INTERNALS #include "../jinclude.h" #include "../jpeglib.h" @@ -23,105 +30,30 @@ #include "../jsimddct.h" #include "jsimd.h" -#include -#include -#include - static unsigned int simd_support = ~0; -#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__) - -#define SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT (1024 * 1024) - -LOCAL(int) -check_feature (char *buffer, char *feature) -{ - char *p; - if (*feature == 0) - return 0; - if (strncmp(buffer, "Features", 8) != 0) - return 0; - buffer += 8; - while (isspace(*buffer)) - buffer++; - - /* Check if 'feature' is present in the buffer as a separate word */ - while ((p = strstr(buffer, feature))) { - if (p > buffer && !isspace(*(p - 1))) { - buffer++; - continue; - } - p += strlen(feature); - if (*p != 0 && !isspace(*p)) { - buffer++; - continue; - } - return 1; - } - return 0; -} - -LOCAL(int) -parse_proc_cpuinfo (int bufsize) -{ - char *buffer = (char *)malloc(bufsize); - FILE *fd; - simd_support = 0; - - if (!buffer) - return 0; - - fd = fopen("/proc/cpuinfo", "r"); - if (fd) { - while (fgets(buffer, bufsize, fd)) { - if (!strchr(buffer, '\n') && !feof(fd)) { - /* "impossible" happened - insufficient size of the buffer! */ - fclose(fd); - free(buffer); - return 0; - } - if (check_feature(buffer, "neon")) - simd_support |= JSIMD_ARM_NEON; - } - fclose(fd); - } - free(buffer); - return 1; -} - -#endif +extern volatile ElfW(auxv_t) *auxv; /* * Check what SIMD accelerations are supported. - * - * FIXME: This code is racy under a multi-threaded environment. + * this is called once and ONLY once from libjpeg_general_init */ -LOCAL(void) +GLOBAL(void) init_simd (void) { - char *env = NULL; -#if !defined(__ARM_NEON__) && defined(__linux__) || defined(ANDROID) || defined(__ANDROID__) - int bufsize = 1024; /* an initial guess for the line buffer size limit */ -#endif + char *env=NULL; + ElfW(auxv_t) *tauxv=(ElfW(auxv_t) *)auxv; if (simd_support != ~0) return; - simd_support = 0; -#if defined(__ARM_NEON__) - simd_support |= JSIMD_ARM_NEON; -#elif defined(__linux__) || defined(ANDROID) || defined(__ANDROID__) - /* We still have a chance to use NEON regardless of globally used - * -mcpu/-mfpu options passed to gcc by performing runtime detection via - * /proc/cpuinfo parsing on linux/android */ - while (!parse_proc_cpuinfo(bufsize)) { - bufsize *= 2; - if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT) - break; - } -#endif + while (tauxv && tauxv->a_type != AT_HWCAP) + tauxv++; + if( tauxv && tauxv->a_un.a_val & HWCAP_NEON ) + simd_support |= JSIMD_ARM_NEON; + /* Force different settings through environment variables */ env = getenv("JSIMD_FORCE_ARM_NEON"); if ((env != NULL) && (strcmp(env, "1") == 0)) @@ -134,8 +66,6 @@ GLOBAL(int) jsimd_can_rgb_ycc (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -153,16 +83,12 @@ GLOBAL(int) jsimd_can_rgb_gray (void) { - init_simd(); - return 0; } GLOBAL(int) jsimd_can_ycc_rgb (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -260,16 +186,12 @@ GLOBAL(int) jsimd_can_h2v2_downsample (void) { - init_simd(); - return 0; } GLOBAL(int) jsimd_can_h2v1_downsample (void) { - init_simd(); - return 0; } @@ -288,16 +210,12 @@ GLOBAL(int) jsimd_can_h2v2_upsample (void) { - init_simd(); - return 0; } GLOBAL(int) jsimd_can_h2v1_upsample (void) { - init_simd(); - return 0; } @@ -320,16 +238,12 @@ GLOBAL(int) jsimd_can_h2v2_fancy_upsample (void) { - init_simd(); - return 0; } GLOBAL(int) jsimd_can_h2v1_fancy_upsample (void) { - init_simd(); - return 0; } @@ -352,16 +266,12 @@ GLOBAL(int) jsimd_can_h2v2_merged_upsample (void) { - init_simd(); - return 0; } GLOBAL(int) jsimd_can_h2v1_merged_upsample (void) { - init_simd(); - return 0; } @@ -384,8 +294,6 @@ GLOBAL(int) jsimd_can_convsamp (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -405,8 +313,6 @@ GLOBAL(int) jsimd_can_convsamp_float (void) { - init_simd(); - return 0; } @@ -427,16 +333,12 @@ GLOBAL(int) jsimd_can_fdct_islow (void) { - init_simd(); - return 0; } GLOBAL(int) jsimd_can_fdct_ifast (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -452,8 +354,6 @@ GLOBAL(int) jsimd_can_fdct_float (void) { - init_simd(); - return 0; } @@ -477,8 +377,6 @@ GLOBAL(int) jsimd_can_quantize (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -496,8 +394,6 @@ GLOBAL(int) jsimd_can_quantize_float (void) { - init_simd(); - return 0; } @@ -518,8 +414,6 @@ GLOBAL(int) jsimd_can_idct_2x2 (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -541,8 +435,6 @@ GLOBAL(int) jsimd_can_idct_4x4 (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -582,8 +474,6 @@ GLOBAL(int) jsimd_can_idct_islow (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -605,8 +495,6 @@ GLOBAL(int) jsimd_can_idct_ifast (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -630,8 +518,6 @@ GLOBAL(int) jsimd_can_idct_float (void) { - init_simd(); - return 0; } diff -uNr -x .bzr libjpeg-turbo-1.1.90+svn702/simd/jsimd_i386.c libjpeg-turbo.now/simd/jsimd_i386.c --- libjpeg-turbo-1.1.90+svn702/simd/jsimd_i386.c 2011-02-18 20:51:10.000000000 +0000 +++ libjpeg-turbo.now/simd/jsimd_i386.c 2011-09-22 18:25:08.000000000 +0000 @@ -36,7 +36,7 @@ * * FIXME: This code is racy under a multi-threaded environment. */ -LOCAL(void) +GLOBAL(void) init_simd (void) { char *env = NULL; @@ -64,8 +64,6 @@ GLOBAL(int) jsimd_can_rgb_ycc (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -86,8 +84,6 @@ GLOBAL(int) jsimd_can_rgb_gray (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -108,8 +104,6 @@ GLOBAL(int) jsimd_can_ycc_rgb (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -277,8 +271,6 @@ GLOBAL(int) jsimd_can_h2v2_downsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -296,8 +288,6 @@ GLOBAL(int) jsimd_can_h2v1_downsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -343,8 +333,6 @@ GLOBAL(int) jsimd_can_h2v2_upsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -362,8 +350,6 @@ GLOBAL(int) jsimd_can_h2v1_upsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -409,8 +395,6 @@ GLOBAL(int) jsimd_can_h2v2_fancy_upsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -429,8 +413,6 @@ GLOBAL(int) jsimd_can_h2v1_fancy_upsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -479,8 +461,6 @@ GLOBAL(int) jsimd_can_h2v2_merged_upsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -499,8 +479,6 @@ GLOBAL(int) jsimd_can_h2v1_merged_upsample (void) { - init_simd(); - /* The code is optimised for these values only */ if (BITS_IN_JSAMPLE != 8) return 0; @@ -619,8 +597,6 @@ GLOBAL(int) jsimd_can_convsamp (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -642,8 +618,6 @@ GLOBAL(int) jsimd_can_convsamp_float (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -689,8 +663,6 @@ GLOBAL(int) jsimd_can_fdct_islow (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -708,8 +680,6 @@ GLOBAL(int) jsimd_can_fdct_ifast (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -727,8 +697,6 @@ GLOBAL(int) jsimd_can_fdct_float (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -773,8 +741,6 @@ GLOBAL(int) jsimd_can_quantize (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -794,8 +760,6 @@ GLOBAL(int) jsimd_can_quantize_float (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -839,8 +803,6 @@ GLOBAL(int) jsimd_can_idct_2x2 (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -864,8 +826,6 @@ GLOBAL(int) jsimd_can_idct_4x4 (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -911,8 +871,6 @@ GLOBAL(int) jsimd_can_idct_islow (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -936,8 +894,6 @@ GLOBAL(int) jsimd_can_idct_ifast (void) { - init_simd(); - /* The code is optimised for these values only */ if (DCTSIZE != 8) return 0; @@ -963,8 +919,6 @@ GLOBAL(int) jsimd_can_idct_float (void) { - init_simd(); - if (DCTSIZE != 8) return 0; if (sizeof(JCOEF) != 2) debian/patches/CVE-2014-9092.patch0000644000000000000000000000542513317472712013255 0ustar Backport of: From 402a715f82313384ef4606660c32d8678c79f197 Mon Sep 17 00:00:00 2001 From: DRC Date: Sat, 22 Nov 2014 22:09:30 +0000 Subject: [PATCH] Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1426 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 12 ++++++++++++ jchuff.c | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) #diff --git a/ChangeLog.txt b/ChangeLog.txt #index f0d126b40..58b5208c3 100644 #--- a/ChangeLog.txt #+++ b/ChangeLog.txt #@@ -35,6 +35,18 @@ before it treated the image as a grayscale JPEG. # [8] cjpeg, djpeg, and jpegtran now accept an argument of -version, which will # print the library version and exit. # #+[9] Referring to 1.4 beta1 [15], another extremely rare circumstance was #+discovered under which the Huffman encoder's local buffer can be overrun #+when a buffered destination manager is being used and an #+extremely-high-frequency block (basically junk image data) is being encoded. #+Even though the Huffman local buffer was increased from 128 bytes to 136 bytes #+to address the previous issue, the new issue caused even the larger buffer to #+be overrun. Further analysis reveals that, in the absolute worst case (such as #+setting alternating AC coefficients to 32767 and -32768 in the JPEG scanning #+order), the Huffman encoder can produce encoded blocks that approach double the #+size of the unencoded blocks. Thus, the Huffman local buffer was increased to #+256 bytes, which should prevent any such issue from re-occurring in the future. #+ # # 1.3.90 (1.4 beta1) # ================== Index: libjpeg-turbo-1.3.0/jchuff.c =================================================================== --- libjpeg-turbo-1.3.0.orig/jchuff.c 2018-07-05 15:46:30.803075419 -0400 +++ libjpeg-turbo-1.3.0/jchuff.c 2018-07-05 15:47:07.095124033 -0400 @@ -391,7 +391,16 @@ dump_buffer (working_state * state) #endif -#define BUFSIZE (DCTSIZE2 * 2) +/* Although it is exceedingly rare, it is possible for a Huffman-encoded + * coefficient block to be larger than the 128-byte unencoded block. For each + * of the 64 coefficients, PUT_BITS is invoked twice, and each invocation can + * theoretically store 16 bits (for a maximum of 2048 bits or 256 bytes per + * encoded block.) If, for instance, one artificially sets the AC + * coefficients to alternating values of 32767 and -32768 (using the JPEG + * scanning order-- 1, 8, 16, etc.), then this will produce an encoded block + * larger than 200 bytes. + */ +#define BUFSIZE (DCTSIZE2 * 4) #define LOAD_BUFFER() { \ if (state->free_in_buffer < BUFSIZE) { \ debian/patches/install-tjunittest.patch0000644000000000000000000000062512175234733015531 0ustar Description: install tjunittest --- Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/Makefile.am +++ b/Makefile.am @@ -89,9 +89,7 @@ noinst_PROGRAMS = jcstest if WITH_TURBOJPEG -bin_PROGRAMS += tjbench - -noinst_PROGRAMS += tjunittest +bin_PROGRAMS += tjbench tjunittest tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \ wrbmp.c wrppm.c debian/patches/CVE-2018-11212.patch0000644000000000000000000000222213317473205013312 0ustar From 82923eb93a2eacf4a593e00e3e672bbb86a8a3a0 Mon Sep 17 00:00:00 2001 From: Frank Bossen Date: Mon, 29 Dec 2014 18:38:36 +0100 Subject: [PATCH] Check image size when reading targa file Throw an error when image width or height is 0. Fixes mozilla/mozjpeg#140, closes #7. --- rdtarga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: libjpeg-turbo-1.3.0/rdtarga.c =================================================================== --- libjpeg-turbo-1.3.0.orig/rdtarga.c 2018-07-05 15:49:51.223363196 -0400 +++ libjpeg-turbo-1.3.0/rdtarga.c 2018-07-05 15:50:20.575408836 -0400 @@ -363,7 +363,8 @@ start_input_tga (j_compress_ptr cinfo, c if (cmaptype > 1 || /* cmaptype must be 0 or 1 */ source->pixel_size < 1 || source->pixel_size > 4 || (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */ - interlace_type != 0) /* currently don't allow interlaced image */ + interlace_type != 0 || /* currently don't allow interlaced image */ + width == 0 || height == 0) /* image width/height must be non-zero */ ERREXIT(cinfo, JERR_TGA_BADPARMS); if (subtype > 8) { debian/patches/CVE-2016-3616.patch0000644000000000000000000001014113317473014013236 0ustar From 6709e4a0cfa44d4f54ee8ad05753d4aa9260cb91 Mon Sep 17 00:00:00 2001 From: Frank Bossen Date: Mon, 29 Dec 2014 19:42:20 +0100 Subject: [PATCH] Check range of integer values in PPM text file Add checks to ensure values are within the specified range. Fixes mozilla/mozjpeg#141, closes #8 --- cderror.h | 1 + rdppm.c | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) Index: libjpeg-turbo-1.3.0/cderror.h =================================================================== --- libjpeg-turbo-1.3.0.orig/cderror.h 2018-07-05 15:47:45.279176989 -0400 +++ libjpeg-turbo-1.3.0/cderror.h 2018-07-05 15:47:45.275176983 -0400 @@ -74,6 +74,7 @@ JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out o #ifdef PPM_SUPPORTED JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") +JMESSAGE(JERR_PPM_TOOLARGE, "Integer value too large in PPM file") JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") JMESSAGE(JTRC_PGM, "%ux%u PGM image") JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") Index: libjpeg-turbo-1.3.0/rdppm.c =================================================================== --- libjpeg-turbo-1.3.0.orig/rdppm.c 2018-07-05 15:47:45.279176989 -0400 +++ libjpeg-turbo-1.3.0/rdppm.c 2018-07-05 15:48:08.743210391 -0400 @@ -76,6 +76,7 @@ typedef struct { JSAMPROW pixrow; /* FAR pointer to same */ size_t buffer_width; /* width of I/O buffer */ JSAMPLE *rescale; /* => maxval-remapping array, or NULL */ + int maxval; } ppm_source_struct; typedef ppm_source_struct * ppm_source_ptr; @@ -99,7 +100,7 @@ pbm_getc (FILE * infile) LOCAL(unsigned int) -read_pbm_integer (j_compress_ptr cinfo, FILE * infile) +read_pbm_integer (j_compress_ptr cinfo, FILE * infile, int maxval) /* Read an unsigned decimal integer from the PPM file */ /* Swallows one trailing character after the integer */ /* Note that on a 16-bit-int machine, only values up to 64k can be read. */ @@ -123,6 +124,10 @@ read_pbm_integer (j_compress_ptr cinfo, val *= 10; val += ch - '0'; } + + if (val > maxval) + ERREXIT(cinfo, JERR_PPM_TOOLARGE); + return val; } @@ -147,10 +152,11 @@ get_text_gray_row (j_compress_ptr cinfo, register JSAMPROW ptr; register JSAMPLE *rescale = source->rescale; JDIMENSION col; + int maxval = source->maxval; ptr = source->pub.buffer[0]; for (col = cinfo->image_width; col > 0; col--) { - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)]; } return 1; } @@ -165,12 +171,13 @@ get_text_rgb_row (j_compress_ptr cinfo, register JSAMPROW ptr; register JSAMPLE *rescale = source->rescale; JDIMENSION col; + int maxval = source->maxval; ptr = source->pub.buffer[0]; for (col = cinfo->image_width; col > 0; col--) { - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile, maxval)]; } return 1; } @@ -319,9 +326,9 @@ start_input_ppm (j_compress_ptr cinfo, c } /* fetch the remaining header info */ - w = read_pbm_integer(cinfo, source->pub.input_file); - h = read_pbm_integer(cinfo, source->pub.input_file); - maxval = read_pbm_integer(cinfo, source->pub.input_file); + w = read_pbm_integer(cinfo, source->pub.input_file, 65535); + h = read_pbm_integer(cinfo, source->pub.input_file, 65535); + maxval = read_pbm_integer(cinfo, source->pub.input_file, 65535); if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ ERREXIT(cinfo, JERR_PPM_NOT); @@ -329,6 +336,7 @@ start_input_ppm (j_compress_ptr cinfo, c cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ cinfo->image_width = (JDIMENSION) w; cinfo->image_height = (JDIMENSION) h; + source->maxval = maxval; /* initialize flags to most common settings */ need_iobuffer = TRUE; /* do we need an I/O buffer? */ debian/README.source0000644000000000000000000000010511774332764011357 0ustar Please refer to /usr/share/doc/quilt/README.source for use of quilt. debian/libturbojpeg.install0000644000000000000000000000003512175237435013255 0ustar usr/lib/*/libturbojpeg.so.0* debian/compat0000644000000000000000000000000211774332764010402 0ustar 9 debian/copyright0000644000000000000000000001372512175237435011142 0ustar Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Name: libjpeg-turbo Source: lp:libjpeg-turbo Files: * Copyright: 1999-2006 MIYASAKA Masaru 2004 Landmark Graphics Corporation 2005-2007 Sun Microsystems, Inc. 2009 Pierre Ossman for Cendio AB 2009-2010 D. R. Commander 2010 Thomas G. Lane, Guido Vollbeding 2009, Thomas G. Lane, Guido Vollbeding 1998, Thomas G. Lane 2010 Nokia Corporation License: JPEG . In plain English: . 1. We don't promise that this software works. (But if you find any bugs, please let us know!) 2. You can use this software for whatever you want. You don't have to pay us. 3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in your documentation that you've used the IJG code. . In legalese: The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. . This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. All Rights Reserved except as specified below. . Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. . These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. . Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". . We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. . . ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA . ansi2knr.c is NOT covered by the above copyright and conditions, but instead by the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. . The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltmain.sh). Another support script, install-sh, is copyright by X Consortium but is also freely distributable. . The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by all standard GIF decoders. . We are required to state that "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated." Files: md5/md5.* Copyright: 1991-2, RSA Data Security, Inc. License: License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. . License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. . RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. . These notices must be retained in any copies of any part of this documentation and/or software. Files: debian/* Copyright: 2010, 2011 Linaro Limited License: LGPL-2.1 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License (LGPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. . You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU Library General Public License, version 2, can be found in /usr/share/common-licenses/LGPL-2.1. debian/extra/0000755000000000000000000000000012026611035010305 5ustar debian/extra/jpegexiforient.10000644000000000000000000000370511774332764013440 0ustar .TH JPEGEXIFORIENT "1" "February 2005" "jpegexiforient" "User Commands" .SH NAME jpegexiforient \- reads or writes the Exif Orientation Tag .SH SYNOPSIS .B jpegexiforient [\fIswitches\fR] \fIjpegfile\fR .SH DESCRIPTION . This is a utility program to get and set the Exif Orientation Tag. It can be used together with jpegtran in scripts for automatic orientation correction of digital camera pictures. .PP The Exif orientation value gives the orientation of the camera relative to the scene when the image was captured. The relation of the '0th row' and '0th column' to visual position is shown as below. .IP .nf .ft CR Value | 0th Row | 0th Column ------+-------------+----------- 1 | top | left side 2 | top | right side 3 | bottom | right side 4 | bottom | left side 5 | left side | top 6 | right side | top 7 | right side | bottom 8 | left side | bottom .fi .PP For convenience, here is what the letter F would look like if it were tagged correctly and displayed by a program that ignores the orientation tag: .IP .nf .ft CB 1 2 3 4 888888 888888 88 88 88 88 88 88 8888 8888 8888 8888 88 88 88 88 88 88 888888 888888 5 6 7 8 8888888888 88 88 8888888888 88 88 88 88 88 88 88 88 88 8888888888 8888888888 88 .fi .PP jpegexiforient output the Exif Orientation Tag in a JPEG Exif file. With the options -1 .. -8, it can also be used to set the tag. . .SS "OPTIONS" .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .TP \fB\-n\fR Do not output the trailing newline .TP \fB\-1\fR .. \fB\-8\fR Set orientation value 1 .. 8 .SH "AUTHOR" Guido Vollbeding .SH "SEE ALSO" .BR jpegtran(1), .BR exifautotran(1) debian/extra/Makefile0000644000000000000000000000116011774332764011765 0ustar CFLAGS = -O2 -Wall -g CC = cc INSTALL = install -m755 -o root -g root INSTALLDIR = install -m755 -o root -g root -d DESTDIR = prefix = /usr/local bindir = $(prefix)/bin mandir = $(prefix)/share/man/man1 all: jpegexiforient jpegexiforient: jpegexiforient.c $(CC) $(CFLAGS) -o jpegexiforient jpegexiforient.c clean: -rm -f jpegexiforient install: $(INSTALLDIR) $(DESTDIR)$(bindir) $(INSTALLDIR) $(DESTDIR)$(mandir) $(INSTALL) jpegexiforient $(DESTDIR)$(bindir) $(INSTALL) jpegexiforient.1 $(DESTDIR)$(mandir) $(INSTALL) exifautotran $(DESTDIR)$(bindir) $(INSTALL) exifautotran.1 $(DESTDIR)$(mandir) debian/extra/exifautotran.10000644000000000000000000000061311774332764013122 0ustar .TH EXIFAUTOTRAN "1" "February 2005" "exifautotran" "User Commands" .SH NAME exifautotran \- Transforms Exif files so that Orientation becomes 1 .SH DESCRIPTION exifautotran [list of files] .PP Take a list of files as input and transform them in place so that the Orientation becomes 1. .SH "AUTHOR" Guido Vollbeding .SH "SEE ALSO" .BR jpegtran(1) .BR jpegexiforient(1) debian/extra/exifautotran0000644000000000000000000000215511774332764012766 0ustar #!/bin/sh # exifautotran [list of files] # # Transforms Exif files so that Orientation becomes 1 # trap "if test -n \"\$tempfile\"; then rm -f \"\$tempfile\"; fi" INT QUIT TERM for i do case $i in -v|--version) echo "exifautotran"; exit 0;; -h|--help) cat <&2 exit 1; fi echo Executing: jpegtran -copy all $transform $i >&2 jpegtran -copy all $transform "$i" > $tempfile if test $? -ne 0; then echo Error while transforming $i - skipped. >&2 rm "$tempfile" else cp "$tempfile" "$i" rm "$tempfile" jpegexiforient -1 "$i" > /dev/null fi fi done debian/extra/jpegexiforient.c0000644000000000000000000002045711774332764013525 0ustar /* * jpegexiforient.c * * This is a utility program to get and set the Exif Orientation Tag. * It can be used together with jpegtran in scripts for automatic * orientation correction of digital camera pictures. * * The Exif orientation value gives the orientation of the camera * relative to the scene when the image was captured. The relation * of the '0th row' and '0th column' to visual position is shown as * below. * * Value | 0th Row | 0th Column * ------+-------------+----------- * 1 | top | left side * 2 | top | right side * 3 | bottom | right side * 4 | bottom | left side * 5 | left side | top * 6 | right side | top * 7 | right side | bottom * 8 | left side | bottom * * For convenience, here is what the letter F would look like if it were * tagged correctly and displayed by a program that ignores the orientation * tag: * * 1 2 3 4 5 6 7 8 * * 888888 888888 88 88 8888888888 88 88 8888888888 * 88 88 88 88 88 88 88 88 88 88 88 88 * 8888 8888 8888 8888 88 8888888888 8888888888 88 * 88 88 88 88 * 88 88 888888 888888 * */ #include #include static FILE * myfile; /* My JPEG file */ static unsigned char exif_data[65536L]; /* Return next input byte, or EOF if no more */ #define NEXTBYTE() getc(myfile) /* Error exit handler */ #define ERREXIT(msg) (exit(0)) /* Read one byte, testing for EOF */ static int read_1_byte (void) { int c; c = NEXTBYTE(); if (c == EOF) ERREXIT("Premature EOF in JPEG file"); return c; } /* Read 2 bytes, convert to unsigned int */ /* All 2-byte quantities in JPEG markers are MSB first */ static unsigned int read_2_bytes (void) { int c1, c2; c1 = NEXTBYTE(); if (c1 == EOF) ERREXIT("Premature EOF in JPEG file"); c2 = NEXTBYTE(); if (c2 == EOF) ERREXIT("Premature EOF in JPEG file"); return (((unsigned int) c1) << 8) + ((unsigned int) c2); } static const char * progname; /* program name for error messages */ static void usage (FILE *out) /* complain about bad command line */ { fprintf(out, "jpegexiforient reads or writes the Exif Orientation Tag "); fprintf(out, "in a JPEG Exif file.\n"); fprintf(out, "Usage: %s [switches] jpegfile\n", progname); fprintf(out, "Switches:\n"); fprintf(out, " --help display this help and exit\n"); fprintf(out, " --version output version information and exit\n"); fprintf(out, " -n Do not output the trailing newline\n"); fprintf(out, " -1 .. -8 Set orientation value 1 .. 8\n"); } /* * The main program. */ int main (int argc, char **argv) { int n_flag, set_flag; unsigned int length, i; int is_motorola; /* Flag for byte order */ unsigned int offset, number_of_tags, tagnum; progname = argv[0]; if (progname == NULL || progname[0] == 0) progname = "jpegexiforient"; /* in case C library doesn't provide it */ if (argc < 2) { usage(stderr); return 1; } n_flag = 0; set_flag = 0; i = 1; while (argv[i][0] == '-') { switch (argv[i][1]) { case '-': switch (argv[i][2]) { case 'h': usage(stdout); return 0; case 'v': fprintf(stdout,"jpegexiforient\n"); return 0; } case 'n': n_flag = 1; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': set_flag = argv[i][1] - '0'; break; default: usage(stderr); return 1; } if (++i >= argc) { usage(stderr); return 1; } } if (set_flag) { if ((myfile = fopen(argv[i], "rb+")) == NULL) { fprintf(stderr, "%s: can't open %s\n", progname, argv[i]); return 0; } } else { if ((myfile = fopen(argv[i], "rb")) == NULL) { fprintf(stderr, "%s: can't open %s\n", progname, argv[i]); return 0; } } /* Read File head, check for JPEG SOI + Exif APP1 */ for (i = 0; i < 4; i++) exif_data[i] = (unsigned char) read_1_byte(); if (exif_data[0] != 0xFF || exif_data[1] != 0xD8 || exif_data[2] != 0xFF || exif_data[3] != 0xE1) return 0; /* Get the marker parameter length count */ length = read_2_bytes(); /* Length includes itself, so must be at least 2 */ /* Following Exif data length must be at least 6 */ if (length < 8) return 0; length -= 8; /* Read Exif head, check for "Exif" */ for (i = 0; i < 6; i++) exif_data[i] = (unsigned char) read_1_byte(); if (exif_data[0] != 0x45 || exif_data[1] != 0x78 || exif_data[2] != 0x69 || exif_data[3] != 0x66 || exif_data[4] != 0 || exif_data[5] != 0) return 0; /* Read Exif body */ for (i = 0; i < length; i++) exif_data[i] = (unsigned char) read_1_byte(); if (length < 12) return 0; /* Length of an IFD entry */ /* Discover byte order */ if (exif_data[0] == 0x49 && exif_data[1] == 0x49) is_motorola = 0; else if (exif_data[0] == 0x4D && exif_data[1] == 0x4D) is_motorola = 1; else return 0; /* Check Tag Mark */ if (is_motorola) { if (exif_data[2] != 0) return 0; if (exif_data[3] != 0x2A) return 0; } else { if (exif_data[3] != 0) return 0; if (exif_data[2] != 0x2A) return 0; } /* Get first IFD offset (offset to IFD0) */ if (is_motorola) { if (exif_data[4] != 0) return 0; if (exif_data[5] != 0) return 0; offset = exif_data[6]; offset <<= 8; offset += exif_data[7]; } else { if (exif_data[7] != 0) return 0; if (exif_data[6] != 0) return 0; offset = exif_data[5]; offset <<= 8; offset += exif_data[4]; } if (offset > length - 2) return 0; /* check end of data segment */ /* Get the number of directory entries contained in this IFD */ if (is_motorola) { number_of_tags = exif_data[offset]; number_of_tags <<= 8; number_of_tags += exif_data[offset+1]; } else { number_of_tags = exif_data[offset+1]; number_of_tags <<= 8; number_of_tags += exif_data[offset]; } if (number_of_tags == 0) return 0; offset += 2; /* Search for Orientation Tag in IFD0 */ for (;;) { if (offset > length - 12) return 0; /* check end of data segment */ /* Get Tag number */ if (is_motorola) { tagnum = exif_data[offset]; tagnum <<= 8; tagnum += exif_data[offset+1]; } else { tagnum = exif_data[offset+1]; tagnum <<= 8; tagnum += exif_data[offset]; } if (tagnum == 0x0112) break; /* found Orientation Tag */ if (--number_of_tags == 0) return 0; offset += 12; } if (set_flag) { /* Set the Orientation value */ if (is_motorola) { exif_data[offset+2] = 0; /* Format = unsigned short (2 octets) */ exif_data[offset+3] = 3; exif_data[offset+4] = 0; /* Number Of Components = 1 */ exif_data[offset+5] = 0; exif_data[offset+6] = 0; exif_data[offset+7] = 1; exif_data[offset+8] = 0; exif_data[offset+9] = (unsigned char)set_flag; exif_data[offset+10] = 0; exif_data[offset+11] = 0; } else { exif_data[offset+2] = 3; /* Format = unsigned short (2 octets) */ exif_data[offset+3] = 0; exif_data[offset+4] = 1; /* Number Of Components = 1 */ exif_data[offset+5] = 0; exif_data[offset+6] = 0; exif_data[offset+7] = 0; exif_data[offset+8] = (unsigned char)set_flag; exif_data[offset+9] = 0; exif_data[offset+10] = 0; exif_data[offset+11] = 0; } fseek(myfile, (4 + 2 + 6 + 2) + offset, SEEK_SET); fwrite(exif_data + 2 + offset, 1, 10, myfile); } else { /* Get the Orientation value */ if (is_motorola) { if (exif_data[offset+8] != 0) return 0; set_flag = exif_data[offset+9]; } else { if (exif_data[offset+9] != 0) return 0; set_flag = exif_data[offset+8]; } if (set_flag > 8) return 0; } /* Write out Orientation value */ if (n_flag) printf("%c", '0' + set_flag); else printf("%c\n", '0' + set_flag); /* All done. */ return 0; } debian/libjpeg-turbo8-dev.install0000644000000000000000000000014512175237435014200 0ustar jpegint.h usr/include/ usr/include usr/lib/*/libjpeg.a usr/lib/*/libjpeg.so usr/lib/*/libturbojpeg.a debian/source/0000755000000000000000000000000011774332764010504 5ustar debian/source/format0000644000000000000000000000001411774332764011712 0ustar 3.0 (quilt) debian/libjpeg-turbo8.symbols0000644000000000000000000001420711774332764013457 0ustar libjpeg.so.8 libjpeg8 #MINVER# LIBJPEGTURBO_8.0@LIBJPEGTURBO_8.0 8c LIBJPEG_8.0@LIBJPEG_8.0 8c auxv@LIBJPEG_8.0 8c-2ubuntu5~ (arch=armel armhf i386)init_simd@LIBJPEG_8.0 8c-2ubuntu5~ jcopy_block_row@LIBJPEG_8.0 8c jcopy_sample_rows@LIBJPEG_8.0 8c jdiv_round_up@LIBJPEG_8.0 8c jinit_1pass_quantizer@LIBJPEG_8.0 8c jinit_2pass_quantizer@LIBJPEG_8.0 8c jinit_arith_decoder@LIBJPEG_8.0 8c jinit_arith_encoder@LIBJPEG_8.0 8c jinit_c_coef_controller@LIBJPEG_8.0 8c jinit_c_main_controller@LIBJPEG_8.0 8c jinit_c_master_control@LIBJPEG_8.0 8c jinit_c_prep_controller@LIBJPEG_8.0 8c jinit_color_converter@LIBJPEG_8.0 8c jinit_color_deconverter@LIBJPEG_8.0 8c jinit_compress_master@LIBJPEG_8.0 8c jinit_d_coef_controller@LIBJPEG_8.0 8c jinit_d_main_controller@LIBJPEG_8.0 8c jinit_d_post_controller@LIBJPEG_8.0 8c jinit_downsampler@LIBJPEG_8.0 8c jinit_forward_dct@LIBJPEG_8.0 8c jinit_huff_decoder@LIBJPEG_8.0 8c jinit_huff_encoder@LIBJPEG_8.0 8c jinit_input_controller@LIBJPEG_8.0 8c jinit_inverse_dct@LIBJPEG_8.0 8c jinit_marker_reader@LIBJPEG_8.0 8c jinit_marker_writer@LIBJPEG_8.0 8c jinit_master_decompress@LIBJPEG_8.0 8c jinit_memory_mgr@LIBJPEG_8.0 8c jinit_merged_upsampler@LIBJPEG_8.0 8c jinit_phuff_decoder@LIBJPEG_8.0 8c jinit_phuff_encoder@LIBJPEG_8.0 8c jinit_upsampler@LIBJPEG_8.0 8c jpeg_CreateCompress@LIBJPEG_8.0 8c jpeg_CreateDecompress@LIBJPEG_8.0 8c jpeg_abort@LIBJPEG_8.0 8c jpeg_abort_compress@LIBJPEG_8.0 8c jpeg_abort_decompress@LIBJPEG_8.0 8c jpeg_add_quant_table@LIBJPEG_8.0 8c jpeg_alloc_huff_table@LIBJPEG_8.0 8c jpeg_alloc_quant_table@LIBJPEG_8.0 8c jpeg_aritab@LIBJPEG_8.0 8c jpeg_calc_jpeg_dimensions@LIBJPEG_8.0 8c jpeg_calc_output_dimensions@LIBJPEG_8.0 8c jpeg_consume_input@LIBJPEG_8.0 8c jpeg_copy_critical_parameters@LIBJPEG_8.0 8c jpeg_core_output_dimensions@LIBJPEG_8.0 8c jpeg_default_colorspace@LIBJPEG_8.0 8c jpeg_default_qtables@LIBJPEG_8.0 8c jpeg_destroy@LIBJPEG_8.0 8c jpeg_destroy_compress@LIBJPEG_8.0 8c jpeg_destroy_decompress@LIBJPEG_8.0 8c jpeg_fdct_10x10@LIBJPEG_8.0 8c jpeg_fdct_10x5@LIBJPEG_8.0 8c jpeg_fdct_11x11@LIBJPEG_8.0 8c jpeg_fdct_12x12@LIBJPEG_8.0 8c jpeg_fdct_12x6@LIBJPEG_8.0 8c jpeg_fdct_13x13@LIBJPEG_8.0 8c jpeg_fdct_14x14@LIBJPEG_8.0 8c jpeg_fdct_14x7@LIBJPEG_8.0 8c jpeg_fdct_15x15@LIBJPEG_8.0 8c jpeg_fdct_16x16@LIBJPEG_8.0 8c jpeg_fdct_16x8@LIBJPEG_8.0 8c jpeg_fdct_1x1@LIBJPEG_8.0 8c jpeg_fdct_1x2@LIBJPEG_8.0 8c jpeg_fdct_2x1@LIBJPEG_8.0 8c jpeg_fdct_2x2@LIBJPEG_8.0 8c jpeg_fdct_2x4@LIBJPEG_8.0 8c jpeg_fdct_3x3@LIBJPEG_8.0 8c jpeg_fdct_3x6@LIBJPEG_8.0 8c jpeg_fdct_4x2@LIBJPEG_8.0 8c jpeg_fdct_4x4@LIBJPEG_8.0 8c jpeg_fdct_4x8@LIBJPEG_8.0 8c jpeg_fdct_5x10@LIBJPEG_8.0 8c jpeg_fdct_5x5@LIBJPEG_8.0 8c jpeg_fdct_6x12@LIBJPEG_8.0 8c jpeg_fdct_6x3@LIBJPEG_8.0 8c jpeg_fdct_6x6@LIBJPEG_8.0 8c jpeg_fdct_7x14@LIBJPEG_8.0 8c jpeg_fdct_7x7@LIBJPEG_8.0 8c jpeg_fdct_8x16@LIBJPEG_8.0 8c jpeg_fdct_8x4@LIBJPEG_8.0 8c jpeg_fdct_9x9@LIBJPEG_8.0 8c jpeg_fdct_float@LIBJPEG_8.0 8c jpeg_fdct_ifast@LIBJPEG_8.0 8c jpeg_fdct_islow@LIBJPEG_8.0 8c jpeg_fill_bit_buffer@LIBJPEG_8.0 8c jpeg_finish_compress@LIBJPEG_8.0 8c jpeg_finish_decompress@LIBJPEG_8.0 8c jpeg_finish_output@LIBJPEG_8.0 8c jpeg_free_large@LIBJPEG_8.0 8c jpeg_free_small@LIBJPEG_8.0 8c jpeg_gen_optimal_table@LIBJPEG_8.0 8c jpeg_get_large@LIBJPEG_8.0 8c jpeg_get_small@LIBJPEG_8.0 8c jpeg_has_multiple_scans@LIBJPEG_8.0 8c jpeg_huff_decode@LIBJPEG_8.0 8c jpeg_idct_10x10@LIBJPEG_8.0 8c jpeg_idct_10x5@LIBJPEG_8.0 8c jpeg_idct_11x11@LIBJPEG_8.0 8c jpeg_idct_12x12@LIBJPEG_8.0 8c jpeg_idct_12x6@LIBJPEG_8.0 8c jpeg_idct_13x13@LIBJPEG_8.0 8c jpeg_idct_14x14@LIBJPEG_8.0 8c jpeg_idct_14x7@LIBJPEG_8.0 8c jpeg_idct_15x15@LIBJPEG_8.0 8c jpeg_idct_16x16@LIBJPEG_8.0 8c jpeg_idct_16x8@LIBJPEG_8.0 8c jpeg_idct_1x1@LIBJPEG_8.0 8c jpeg_idct_1x2@LIBJPEG_8.0 8c jpeg_idct_2x1@LIBJPEG_8.0 8c jpeg_idct_2x2@LIBJPEG_8.0 8c jpeg_idct_2x4@LIBJPEG_8.0 8c jpeg_idct_3x3@LIBJPEG_8.0 8c jpeg_idct_3x6@LIBJPEG_8.0 8c jpeg_idct_4x2@LIBJPEG_8.0 8c jpeg_idct_4x4@LIBJPEG_8.0 8c jpeg_idct_4x8@LIBJPEG_8.0 8c jpeg_idct_5x10@LIBJPEG_8.0 8c jpeg_idct_5x5@LIBJPEG_8.0 8c jpeg_idct_6x12@LIBJPEG_8.0 8c jpeg_idct_6x3@LIBJPEG_8.0 8c jpeg_idct_6x6@LIBJPEG_8.0 8c jpeg_idct_7x14@LIBJPEG_8.0 8c jpeg_idct_7x7@LIBJPEG_8.0 8c jpeg_idct_8x16@LIBJPEG_8.0 8c jpeg_idct_8x4@LIBJPEG_8.0 8c jpeg_idct_9x9@LIBJPEG_8.0 8c jpeg_idct_float@LIBJPEG_8.0 8c jpeg_idct_ifast@LIBJPEG_8.0 8c jpeg_idct_islow@LIBJPEG_8.0 8c jpeg_input_complete@LIBJPEG_8.0 8c jpeg_make_c_derived_tbl@LIBJPEG_8.0 8c jpeg_make_d_derived_tbl@LIBJPEG_8.0 8c jpeg_mem_available@LIBJPEG_8.0 8c jpeg_mem_dest@LIBJPEG_8.0 8c jpeg_mem_init@LIBJPEG_8.0 8c jpeg_mem_src@LIBJPEG_8.0 8c jpeg_mem_term@LIBJPEG_8.0 8c jpeg_natural_order2@LIBJPEG_8.0 8c jpeg_natural_order3@LIBJPEG_8.0 8c jpeg_natural_order4@LIBJPEG_8.0 8c jpeg_natural_order5@LIBJPEG_8.0 8c jpeg_natural_order6@LIBJPEG_8.0 8c jpeg_natural_order7@LIBJPEG_8.0 8c jpeg_natural_order@LIBJPEG_8.0 8c jpeg_new_colormap@LIBJPEG_8.0 8c jpeg_open_backing_store@LIBJPEG_8.0 8c jpeg_quality_scaling@LIBJPEG_8.0 8c jpeg_read_coefficients@LIBJPEG_8.0 8c jpeg_read_header@LIBJPEG_8.0 8c jpeg_read_raw_data@LIBJPEG_8.0 8c jpeg_read_scanlines@LIBJPEG_8.0 8c jpeg_resync_to_restart@LIBJPEG_8.0 8c jpeg_save_markers@LIBJPEG_8.0 8c jpeg_set_colorspace@LIBJPEG_8.0 8c jpeg_set_defaults@LIBJPEG_8.0 8c jpeg_set_linear_quality@LIBJPEG_8.0 8c jpeg_set_marker_processor@LIBJPEG_8.0 8c jpeg_set_quality@LIBJPEG_8.0 8c (arch=i386)jpeg_simd_cpu_support@LIBJPEG_8.0 8c-2ubuntu5~ jpeg_simple_progression@LIBJPEG_8.0 8c jpeg_start_compress@LIBJPEG_8.0 8c jpeg_start_decompress@LIBJPEG_8.0 8c jpeg_start_output@LIBJPEG_8.0 8c jpeg_std_error@LIBJPEG_8.0 8c jpeg_std_message_table@LIBJPEG_8.0 8c jpeg_stdio_dest@LIBJPEG_8.0 8c jpeg_stdio_src@LIBJPEG_8.0 8c jpeg_suppress_tables@LIBJPEG_8.0 8c jpeg_write_coefficients@LIBJPEG_8.0 8c jpeg_write_m_byte@LIBJPEG_8.0 8c jpeg_write_m_header@LIBJPEG_8.0 8c jpeg_write_marker@LIBJPEG_8.0 8c jpeg_write_raw_data@LIBJPEG_8.0 8c jpeg_write_scanlines@LIBJPEG_8.0 8c jpeg_write_tables@LIBJPEG_8.0 8c jround_up@LIBJPEG_8.0 8c jzero_far@LIBJPEG_8.0 8c libjpeg_general_init@LIBJPEG_8.0 8c-2ubuntu5~ debian/libjpeg-turbo8.install0000644000000000000000000000003012175237435013415 0ustar usr/lib/*/libjpeg.so.8* debian/docs0000644000000000000000000000006211774332764010055 0ustar libjpeg.txt README README-turbo.txt structure.txt debian/libjpeg-turbo-test.install0000644000000000000000000000004312175237435014306 0ustar usr/bin/tjbench usr/bin/tjunittest debian/libturbojpeg.postinst0000755000000000000000000000011511774332764013501 0ustar #!/bin/sh set -e if [ "$1" = "configure" ]; then ldconfig fi #DEBHELPER# debian/libjpeg-turbo-progs.install0000644000000000000000000000021312175237435014460 0ustar usr/bin/cjpeg usr/bin/djpeg usr/bin/exifautotran usr/bin/jpegexiforient usr/bin/jpegtran usr/bin/rdjpgcom usr/bin/wrjpgcom usr/share/man/* debian/changelog0000644000000000000000000002025013317474137011051 0ustar libjpeg-turbo (1.3.0-0ubuntu2.1) trusty-security; urgency=medium * SECURITY UPDATE: denial of service via JPEG file - debian/patches/CVE-2014-9092.patch: adjust size in jchuff.c. - CVE-2014-9092 * SECURITY UPDATE: denial of service via crafted file - debian/patches/CVE-2016-3616.patch: check range of integer values in PPM text file in cderror.h, rdppm.c. - CVE-2016-3616 - CVE-2018-11213 - CVE-2018-11214 * SECURITY UPDATE: divide-by-zero via crafted file - debian/patches/CVE-2018-11212.patch: check image size in rdtarga.c. - CVE-2018-11212 * SECURITY UPDATE: division by zero via BMP image - debian/patches/CVE-2018-1152.patch: add size check in rdbmp.c. - CVE-2018-1152 -- Marc Deslauriers Thu, 05 Jul 2018 15:55:15 -0400 libjpeg-turbo (1.3.0-0ubuntu2) trusty; urgency=low * SECURITY UPDATE: information disclosure via uninitialized memory in the get_sos function (LP: #1252912) - debian/patches/CVE-2013-6629.patch: check for duplications in jdmarker.c. - CVE-2013-6629 * SECURITY UPDATE: information disclosure via uninitialized memory in the get_dht function (LP: #1252912) - debian/patches/CVE-2013-6630.patch: properly clear out memory in jdmarker.c. - CVE-2013-6630 -- Marc Deslauriers Thu, 19 Dec 2013 15:07:26 -0500 libjpeg-turbo (1.3.0-0ubuntu1) saucy; urgency=low * New upstream release. - drop debian/patches/branch-updates.diff - refresh tjunittest.patch (now renamed to install-tjunittest.patch) * Update debian/control: - add myself to Uploaders. * Update debian/copyright: - add RSA Data Security copyright (md5). * Update debian/libturbojpeg.install: - install libturbojpeg.so.0* (needed by tjunittest and tjbench). -- Fathi Boudra Sun, 28 Jul 2013 16:52:51 +0300 libjpeg-turbo (1.2.1-0ubuntu2) quantal; urgency=low * libjpeg-turbo-test: Depend on libjpegturbo. LP: #1053273. -- Matthias Klose Thu, 20 Sep 2012 14:53:18 +0200 libjpeg-turbo (1.2.1-0ubuntu1) quantal; urgency=low [ Tom Gall ] * Update to stable 1.2.1. LP: #1012861. * Addresses CVE-2012-2806. LP: #1025537. A Heap-based buffer overflow was found in the way libjpeg-turbo decompressed certain corrupt JPEG images in which the component count was erroneously set to a large value. An attacker could create a specially-crafted JPEG image that, when opened, could cause an application using libpng to crash or, possibly, execute arbitrary code with the privileges of the user running the application. * Cosmetic fixes to argument lists * Added flags to the TurboJPEG API that allow the caller to force the use of either the fast or the accurate DCT/IDCT algorithms in the underlying codec. * More recent versions of autoconf add -traditional-cpp to the CPP flags, which causes jsimdcfg.inc.h to not preprocess correctly unless we expand all of the instances of the #definev macro. * Fixed regression caused by a bug in the 32-bit strict memory access code in jdmrgss2.asm (contributed by Chromium to stop valgrind from whining whenever the output buffer size was not evenly divisible by 16 bytes.) On Linux/x86, this regression generated incorrect pixels on the right-hand side of images whose rows were not 16-byte aligned, whenever fancy upsampling was used. This patch also enables the strict memory access code on all platforms, not just Linux (it does no harm on other platforms) and removes a couple of pcmpeqb instructions that were rendered unnecessary by r835. * Accelerated 4:2:2 upsampling routine for ARM (improves performance ~20-30% when decompressing 4:2:2 JPEGs using fancy upsampling) * Eliminate the use of the MASKMOVDQU instruction, to speed up decompression performance by 10x on AMD Bobcat embedded processors (and ~5% on AMD desktop processors.) * add tjbench to libjpeg-turbo-test packages * Guard against num_components being a ridiculous value due to a corrupt header * Preserve all 128 bits of xmm6 and xmm7 [ Matthias Klose ] * Prepare the package for quantal, basing on the 1.2.1 release tarball. * d/patches/branch-updates.diff: Update to 20120919 of the 1.2.x branch, but don't bump the version to 1.2.2. * d/patches/guard-inline-define: Remove, integrated upstream. -- Matthias Klose Thu, 20 Sep 2012 00:18:15 +0200 libjpeg-turbo (1.1.90+svn733-0ubuntu6) quantal; urgency=low * Strip -Wl,-Bsymbolic-functions out of LDFLAGS, so that hpcups and pxljr can override jinit_color_converter. LP: #777670. -- Steve Langasek Tue, 10 Jul 2012 17:03:31 +0000 libjpeg-turbo (1.1.90+svn733-0ubuntu5) quantal; urgency=low * Guard the definition of INLINE in an ifndef block, so that third parties including our headers don't get it redefined unexpectedly from under them (which cause the spice FTBFS) -- Adam Conrad Wed, 20 Jun 2012 14:26:21 -0600 libjpeg-turbo (1.1.90+svn733-0ubuntu4.1) precise-proposed; urgency=low * debian/rules: Remove "-Bsymbolic-functions" from LDFLAGS, as this flag breaks the libjpeg use by HPLIP and pxljr, in both cases for printing on the HP Color LaserJet 3500/3550/3600 (LP: #777670). -- Till Kamppeter Tue, 10 Jul 2012 18:44:23 +0200 libjpeg-turbo (1.1.90+svn733-0ubuntu4.1) precise-proposed; urgency=low * debian/rules: Remove "-Bsymbolic-functions" from LDFLAGS, as this flag breaks the libjpeg use by HPLIP and pxljr, in both cases for printing on the HP Color LaserJet 3500/3550/3600 (LP: #777670). -- Till Kamppeter Tue, 10 Jul 2012 18:44:23 +0200 libjpeg-turbo (1.1.90+svn733-0ubuntu4) precise; urgency=low * Install jpegint.h in the -dev package. * Install jconfig.h in the multiarch include directory. -- Matthias Klose Fri, 13 Jan 2012 12:02:38 +0100 libjpeg-turbo (1.1.90+svn733-0ubuntu3) precise; urgency=low * libjpeg-turbo-progs: Remove dependency on libturbojpeg. -- Matthias Klose Wed, 21 Dec 2011 20:10:28 +0100 libjpeg-turbo (1.1.90+svn733-0ubuntu2) precise; urgency=low * Sync with upstream to svn733. * Rename libjpeg-test to libjpeg-turbo-test. * Rename libjpeg-turbo-dbg to libjpeg-turbo8-dbg. * Rename libjpeg8-dev to libjpeg-turbo8-dev. * Move the docs into the -dev package, install the upstream changelog in the -dev only. * Split out libturbojpeg.so into it's own package, don't let libjpeg-turbo8-dev depend on it. * Fix libjpeg-turbo8-dbg package description. * Install jconfig.h into multiarch include path. * Remove HAVE_STD{LIB,DEF}_H from jconfig.h since they are not used and conflict with autoconf. * libjpeg-turbo8: - Add a symbols file, with a different version for symbols only found in the libjpeg-turbo implementation. - Remove the shlibs file. - Breaks/Replaces libjpeg8 (<< 8c-2ubuntu5). * Copy the exifautotran and jpegexiforient tools from the libjpeg8 sources, install into libjpeg-turbo-progs. * Don't install tjbench in libjpeg-turbo-progs to avoid dependency on libturbojpeg. -- Matthias Klose Tue, 20 Dec 2011 23:12:52 +0100 libjpeg-turbo (1.1.90+svn722-1ubuntu5) precise; urgency=low * Remove all useage of diverts in preparation to replace libjpeg8 in precise * small clean up in debian/control -- Tom Gall Thu, 01 Dec 2011 09:50:26 -0600 libjpeg-turbo (1.1.90+svn722-1ubuntu4) precise; urgency=low * Switch package to include libjpeg8 compatibility * Supply -dev -dbg and -test debs -- Tom Gall Wed, 16 Nov 2011 22:14:00 +0000 libjpeg-turbo (1.1.90+svn722-1ubuntu2) oneiric; urgency=low * 11.11 Release * Sync with upstream to svn722 -- Tom Gall Wed, 16 Nov 2011 14:32:12 +0000 libjpeg-turbo (1.1.90+svn702-0ubuntu1) oneiric; urgency=low * Initial Release based on svn 702 * Initial Release and packaging based on svn 702 (LP: #852207) -- Tom Gall Tue, 13 Sep 2011 03:53:56 +0000 debian/libjpeg-turbo8.lintian-overrides0000644000000000000000000000031512175235104015402 0ustar # yes, we specifically want linkers to depends on the standard libjpeg name libjpeg-turbo8: symbols-declares-dependency-on-other-package libjpeg8 #MINVER# libjpeg-turbo8: package-name-doesnt-match-sonames