~ubuntu-branches/ubuntu/trusty/libjpeg-turbo/trusty-proposed

« back to all changes in this revision

Viewing changes to jdmerge.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose, Tom Gall, Matthias Klose
  • Date: 2012-09-20 00:18:15 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120920001815-eijk7v63d1nv0vbo
Tags: 1.2.1-0ubuntu1
[ 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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include "jinclude.h"
39
39
#include "jpeglib.h"
40
40
#include "jsimd.h"
 
41
#include "config.h"
41
42
 
42
43
#ifdef UPSAMPLE_MERGING_SUPPORTED
43
44
 
102
103
#define RGB_RED EXT_RGBX_RED
103
104
#define RGB_GREEN EXT_RGBX_GREEN
104
105
#define RGB_BLUE EXT_RGBX_BLUE
 
106
#define RGB_ALPHA 3
105
107
#define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE
106
108
#define h2v1_merged_upsample_internal extrgbx_h2v1_merged_upsample_internal
107
109
#define h2v2_merged_upsample_internal extrgbx_h2v2_merged_upsample_internal
109
111
#undef RGB_RED
110
112
#undef RGB_GREEN
111
113
#undef RGB_BLUE
 
114
#undef RGB_ALPHA
112
115
#undef RGB_PIXELSIZE
113
116
#undef h2v1_merged_upsample_internal
114
117
#undef h2v2_merged_upsample_internal
130
133
#define RGB_RED EXT_BGRX_RED
131
134
#define RGB_GREEN EXT_BGRX_GREEN
132
135
#define RGB_BLUE EXT_BGRX_BLUE
 
136
#define RGB_ALPHA 3
133
137
#define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE
134
138
#define h2v1_merged_upsample_internal extbgrx_h2v1_merged_upsample_internal
135
139
#define h2v2_merged_upsample_internal extbgrx_h2v2_merged_upsample_internal
137
141
#undef RGB_RED
138
142
#undef RGB_GREEN
139
143
#undef RGB_BLUE
 
144
#undef RGB_ALPHA
140
145
#undef RGB_PIXELSIZE
141
146
#undef h2v1_merged_upsample_internal
142
147
#undef h2v2_merged_upsample_internal
144
149
#define RGB_RED EXT_XBGR_RED
145
150
#define RGB_GREEN EXT_XBGR_GREEN
146
151
#define RGB_BLUE EXT_XBGR_BLUE
 
152
#define RGB_ALPHA 0
147
153
#define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE
148
154
#define h2v1_merged_upsample_internal extxbgr_h2v1_merged_upsample_internal
149
155
#define h2v2_merged_upsample_internal extxbgr_h2v2_merged_upsample_internal
151
157
#undef RGB_RED
152
158
#undef RGB_GREEN
153
159
#undef RGB_BLUE
 
160
#undef RGB_ALPHA
154
161
#undef RGB_PIXELSIZE
155
162
#undef h2v1_merged_upsample_internal
156
163
#undef h2v2_merged_upsample_internal
158
165
#define RGB_RED EXT_XRGB_RED
159
166
#define RGB_GREEN EXT_XRGB_GREEN
160
167
#define RGB_BLUE EXT_XRGB_BLUE
 
168
#define RGB_ALPHA 0
161
169
#define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE
162
170
#define h2v1_merged_upsample_internal extxrgb_h2v1_merged_upsample_internal
163
171
#define h2v2_merged_upsample_internal extxrgb_h2v2_merged_upsample_internal
165
173
#undef RGB_RED
166
174
#undef RGB_GREEN
167
175
#undef RGB_BLUE
 
176
#undef RGB_ALPHA
168
177
#undef RGB_PIXELSIZE
169
178
#undef h2v1_merged_upsample_internal
170
179
#undef h2v2_merged_upsample_internal