summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jstdhuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libjpeg/src/jstdhuff.c')
-rw-r--r--src/3rdparty/libjpeg/src/jstdhuff.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/3rdparty/libjpeg/src/jstdhuff.c b/src/3rdparty/libjpeg/src/jstdhuff.c
index 036d6495a5..345b513d4d 100644
--- a/src/3rdparty/libjpeg/src/jstdhuff.c
+++ b/src/3rdparty/libjpeg/src/jstdhuff.c
@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1998, Thomas G. Lane.
* libjpeg-turbo Modifications:
- * Copyright (C) 2013, D. R. Commander.
+ * Copyright (C) 2013, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -29,7 +29,7 @@ add_huff_table(j_common_ptr cinfo, JHUFF_TBL **htblptr, const UINT8 *bits,
return;
/* Copy the number-of-symbols-of-each-code-length counts */
- MEMCOPY((*htblptr)->bits, bits, sizeof((*htblptr)->bits));
+ memcpy((*htblptr)->bits, bits, sizeof((*htblptr)->bits));
/* Validate the counts. We do this here mainly so we can copy the right
* number of symbols from the val[] array, without risking marching off
@@ -41,8 +41,9 @@ add_huff_table(j_common_ptr cinfo, JHUFF_TBL **htblptr, const UINT8 *bits,
if (nsymbols < 1 || nsymbols > 256)
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
- MEMCOPY((*htblptr)->huffval, val, nsymbols * sizeof(UINT8));
- MEMZERO(&((*htblptr)->huffval[nsymbols]), (256 - nsymbols) * sizeof(UINT8));
+ memcpy((*htblptr)->huffval, val, nsymbols * sizeof(UINT8));
+ memset(&((*htblptr)->huffval[nsymbols]), 0,
+ (256 - nsymbols) * sizeof(UINT8));
/* Initialize sent_table FALSE so table will be written to JPEG file. */
(*htblptr)->sent_table = FALSE;