Bump buildroot to 2019.02
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 3d9c64e9f8aa1ee954d1d0bb3390fc894bb84da3 Mon Sep 17 00:00:00 2001
|
||||
From: DRC <information@libjpeg-turbo.org>
|
||||
Date: Tue, 1 Jan 2019 18:57:36 -0600
|
||||
Subject: [PATCH] tjLoadImage(): Fix int overflow/segfault w/big BMP
|
||||
|
||||
Fixes #304
|
||||
|
||||
[baruch: drop the ChangeLog.md hunk]
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status: commit 3d9c64e9f8aa
|
||||
|
||||
ChangeLog.md | 4 ++++
|
||||
turbojpeg.c | 9 ++++++---
|
||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/turbojpeg.c b/turbojpeg.c
|
||||
index 90a9ce6a0be8..3f7cd640677f 100644
|
||||
--- a/turbojpeg.c
|
||||
+++ b/turbojpeg.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (C)2009-2018 D. R. Commander. All Rights Reserved.
|
||||
+ * Copyright (C)2009-2019 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -1960,7 +1960,8 @@ DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width,
|
||||
int align, int *height, int *pixelFormat,
|
||||
int flags)
|
||||
{
|
||||
- int retval = 0, tempc, pitch;
|
||||
+ int retval = 0, tempc;
|
||||
+ size_t pitch;
|
||||
tjhandle handle = NULL;
|
||||
tjinstance *this;
|
||||
j_compress_ptr cinfo = NULL;
|
||||
@@ -2013,7 +2014,9 @@ DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width,
|
||||
*pixelFormat = cs2pf[cinfo->in_color_space];
|
||||
|
||||
pitch = PAD((*width) * tjPixelSize[*pixelFormat], align);
|
||||
- if ((dstBuf = (unsigned char *)malloc(pitch * (*height))) == NULL)
|
||||
+ if ((unsigned long long)pitch * (unsigned long long)(*height) >
|
||||
+ (unsigned long long)((size_t)-1) ||
|
||||
+ (dstBuf = (unsigned char *)malloc(pitch * (*height))) == NULL)
|
||||
_throwg("tjLoadImage(): Memory allocation failure");
|
||||
|
||||
if (setjmp(this->jerr.setjmp_buffer)) {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From f8cca819a4fb42aafa5f70df43c45e8c416d716f Mon Sep 17 00:00:00 2001
|
||||
From: DRC <information@libjpeg-turbo.org>
|
||||
Date: Tue, 1 Jan 2019 20:32:40 -0600
|
||||
Subject: [PATCH] wrbmp.c: Don't allow quantization w/ non-RGB CS
|
||||
|
||||
If cinfo->quantize_colors == 1, then jpeg_calc_output_dimensions() will
|
||||
set cinfo->output_components to 1, and if cinfo->out_color_space is not
|
||||
RGB (or extended RGB), hilarity will ensue.
|
||||
|
||||
Fixes #305
|
||||
|
||||
[baruch: drop the ChangeLog.md hunk]
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status: commit f8cca819a4
|
||||
|
||||
ChangeLog.md | 4 ++++
|
||||
wrbmp.c | 5 +++--
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/wrbmp.c b/wrbmp.c
|
||||
index 4bf81426b0ef..239f64eb3c3f 100644
|
||||
--- a/wrbmp.c
|
||||
+++ b/wrbmp.c
|
||||
@@ -502,8 +502,9 @@ jinit_write_bmp(j_decompress_ptr cinfo, boolean is_os2,
|
||||
dest->pub.put_pixel_rows = put_gray_rows;
|
||||
else
|
||||
dest->pub.put_pixel_rows = put_pixel_rows;
|
||||
- } else if (cinfo->out_color_space == JCS_RGB565 ||
|
||||
- cinfo->out_color_space == JCS_CMYK) {
|
||||
+ } else if (!cinfo->quantize_colors &&
|
||||
+ (cinfo->out_color_space == JCS_RGB565 ||
|
||||
+ cinfo->out_color_space == JCS_CMYK)) {
|
||||
dest->pub.put_pixel_rows = put_pixel_rows;
|
||||
} else {
|
||||
ERREXIT(cinfo, JERR_BMP_COLORSPACE);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# From https://sourceforge.net/projects/libjpeg-turbo/files/1.5.2/
|
||||
sha1 e788f6defa58b4393a5e1685c018f3b962971457 libjpeg-turbo-1.5.2.tar.gz
|
||||
md5 6b4923e297a7eaa255f08511017a8818 libjpeg-turbo-1.5.2.tar.gz
|
||||
# From https://sourceforge.net/projects/libjpeg-turbo/files/2.0.1/
|
||||
sha1 7ea4a288bccbb5a2d5bfad5fb328d4a839853f4e libjpeg-turbo-2.0.1.tar.gz
|
||||
md5 1b05a66aa9b006fd04ed29f408e68f46 libjpeg-turbo-2.0.1.tar.gz
|
||||
# Locally computed
|
||||
sha256 9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528 libjpeg-turbo-1.5.2.tar.gz
|
||||
sha256 5c08657eda60b7946a913ee22ac73603335a468a6aa95204506a1586a8d677ee LICENSE.md
|
||||
sha256 53a3e3c299e08856964f4c5986e242c3695837b73c64625092f70c774e8af5d2 README.ijg
|
||||
sha256 e5f86cec31df1d39596e0cca619ab1b01f99025a27dafdfc97a30f3a12f866ff libjpeg-turbo-2.0.1.tar.gz
|
||||
sha256 8412238c5ad95965cf3c3197791e9dea8b5fae505d133449e33ee2fa754fe61e LICENSE.md
|
||||
sha256 82fece2bff2669c476495f0fe70096b154e8bc5b40916a64e99836d9a01c3110 README.ijg
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
JPEG_TURBO_VERSION = 1.5.2
|
||||
JPEG_TURBO_VERSION = 2.0.1
|
||||
JPEG_TURBO_SOURCE = libjpeg-turbo-$(JPEG_TURBO_VERSION).tar.gz
|
||||
JPEG_TURBO_SITE = https://downloads.sourceforge.net/project/libjpeg-turbo/$(JPEG_TURBO_VERSION)
|
||||
JPEG_TURBO_LICENSE = IJG (libjpeg), BSD-3-Clause (TurboJPEG), Zlib (SIMD)
|
||||
@@ -13,14 +13,22 @@ JPEG_TURBO_INSTALL_STAGING = YES
|
||||
JPEG_TURBO_PROVIDES = jpeg
|
||||
JPEG_TURBO_DEPENDENCIES = host-pkgconf
|
||||
|
||||
JPEG_TURBO_CONF_OPTS = --with-jpeg8
|
||||
JPEG_TURBO_CONF_OPTS = -DWITH_JPEG8=ON
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=OFF
|
||||
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
||||
JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=ON
|
||||
else ifeq ($(BR2_SHARED_LIBS),y)
|
||||
JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=OFF -DENABLE_SHARED=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JPEG_SIMD_SUPPORT),y)
|
||||
JPEG_TURBO_CONF_OPTS += --with-simd
|
||||
JPEG_TURBO_CONF_OPTS += -DWITH_SIMD=ON
|
||||
# x86 simd support needs nasm
|
||||
JPEG_TURBO_DEPENDENCIES += $(if $(BR2_X86_CPU_HAS_MMX),host-nasm)
|
||||
else
|
||||
JPEG_TURBO_CONF_OPTS += --without-simd
|
||||
JPEG_TURBO_CONF_OPTS += -DWITH_SIMD=OFF
|
||||
endif
|
||||
|
||||
define JPEG_TURBO_REMOVE_USELESS_TOOLS
|
||||
@@ -29,4 +37,4 @@ endef
|
||||
|
||||
JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_USELESS_TOOLS
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(cmake-package))
|
||||
|
||||
Reference in New Issue
Block a user