From 9d10338d583f5c36fff196a0d9bb987638ed6487 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Wed, 2 Mar 2022 10:43:34 +0100 Subject: Update bundled libjpeg-turbo to version 2.1.3 [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.3 Change-Id: I69ebd10641b07af324f6ae056cddb65cc0b5ce82 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 03b930470365bd32f93d761bc823d456e8de6853) Reviewed-by: Eirik Aavitsland --- src/3rdparty/libjpeg/src/jdatadst.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/3rdparty/libjpeg/src/jdatadst.c') diff --git a/src/3rdparty/libjpeg/src/jdatadst.c b/src/3rdparty/libjpeg/src/jdatadst.c index 246fffb58a..6b4fed2339 100644 --- a/src/3rdparty/libjpeg/src/jdatadst.c +++ b/src/3rdparty/libjpeg/src/jdatadst.c @@ -5,7 +5,7 @@ * Copyright (C) 1994-1996, Thomas G. Lane. * Modified 2009-2012 by Guido Vollbeding. * libjpeg-turbo Modifications: - * Copyright (C) 2013, 2016, D. R. Commander. + * Copyright (C) 2013, 2016, 2022, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * @@ -23,11 +23,6 @@ #include "jpeglib.h" #include "jerror.h" -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void *malloc(size_t size); -extern void free(void *ptr); -#endif - /* Expanded data destination object for stdio output */ @@ -116,7 +111,7 @@ empty_output_buffer(j_compress_ptr cinfo) { my_dest_ptr dest = (my_dest_ptr)cinfo->dest; - if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != + if (fwrite(dest->buffer, 1, OUTPUT_BUF_SIZE, dest->outfile) != (size_t)OUTPUT_BUF_SIZE) ERREXIT(cinfo, JERR_FILE_WRITE); @@ -141,7 +136,7 @@ empty_mem_output_buffer(j_compress_ptr cinfo) if (nextbuffer == NULL) ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10); - MEMCOPY(nextbuffer, dest->buffer, dest->bufsize); + memcpy(nextbuffer, dest->buffer, dest->bufsize); free(dest->newbuffer); @@ -175,7 +170,7 @@ term_destination(j_compress_ptr cinfo) /* Write any data remaining in the buffer */ if (datacount > 0) { - if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) + if (fwrite(dest->buffer, 1, datacount, dest->outfile) != datacount) ERREXIT(cinfo, JERR_FILE_WRITE); } fflush(dest->outfile); -- cgit v1.2.3