diff --git a/deps/jpeg-turbo/include/jconfig.h b/deps/jpeg-turbo/include/jconfig.h
index 1d581c71..bf0da58f 100644
--- a/deps/jpeg-turbo/include/jconfig.h
+++ b/deps/jpeg-turbo/include/jconfig.h
@@ -4,10 +4,10 @@
 #define JPEG_LIB_VERSION  62
 
 /* libjpeg-turbo version */
-#define LIBJPEG_TURBO_VERSION  2.1.2
+#define LIBJPEG_TURBO_VERSION  2.1.3
 
 /* libjpeg-turbo version in integer form */
-#define LIBJPEG_TURBO_VERSION_NUMBER  2001002
+#define LIBJPEG_TURBO_VERSION_NUMBER  2001003
 
 /* Support arithmetic encoding */
 #define C_ARITH_CODING_SUPPORTED 1
@@ -32,37 +32,6 @@
 
 #define BITS_IN_JSAMPLE  8      /* use 8 or 12 */
 
-/* Define to 1 if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you need to include <sys/types.h> to get size_t. */
-#define NEED_SYS_TYPES_H 1
-
-/* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
-   memset/memcpy in <string.h>. */
-/* #undef NEED_BSD_STRINGS */
-
-/* Define to 1 if the system has the type `unsigned char'. */
-#define HAVE_UNSIGNED_CHAR 1
-
-/* Define to 1 if the system has the type `unsigned short'. */
-#define HAVE_UNSIGNED_SHORT 1
-
-/* Compiler does not support pointers to undefined structures. */
-/* #undef INCOMPLETE_TYPES_BROKEN */
-
 /* Define if your (broken) compiler shifts signed values as if they were
    unsigned. */
 /* #undef RIGHT_SHIFT_IS_UNSIGNED */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
diff --git a/deps/jpeg-turbo/include/jerror.h b/deps/jpeg-turbo/include/jerror.h
index 4476df2c..eb44a114 100644
--- a/deps/jpeg-turbo/include/jerror.h
+++ b/deps/jpeg-turbo/include/jerror.h
@@ -5,7 +5,7 @@
  * Copyright (C) 1994-1997, Thomas G. Lane.
  * Modified 1997-2009 by Guido Vollbeding.
  * libjpeg-turbo Modifications:
- * Copyright (C) 2014, 2017, D. R. Commander.
+ * Copyright (C) 2014, 2017, 2021-2022, D. R. Commander.
  * For conditions of distribution and use, see the accompanying README.ijg
  * file.
  *
@@ -103,7 +103,7 @@ JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
          "Cannot transcode due to multiple use of quantization table %d")
 JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
 JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
-JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
+JMESSAGE(JERR_NOTIMPL, "Requested features are incompatible")
 JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
 #if JPEG_LIB_VERSION >= 70
 JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
@@ -268,6 +268,7 @@ JMESSAGE(JERR_BAD_DROP_SAMPLING,
 #define ERREXITS(cinfo, code, str) \
   ((cinfo)->err->msg_code = (code), \
    strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
+   (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \
    (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
 
 #define MAKESTMT(stuff)         do { stuff } while (0)
@@ -324,6 +325,7 @@ JMESSAGE(JERR_BAD_DROP_SAMPLING,
 #define TRACEMSS(cinfo, lvl, code, str) \
   ((cinfo)->err->msg_code = (code), \
    strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
+   (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \
    (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
 
 #endif /* JERROR_H */
diff --git a/deps/jpeg-turbo/include/jmorecfg.h b/deps/jpeg-turbo/include/jmorecfg.h
index fb3a9cf4..b33a9919 100644
--- a/deps/jpeg-turbo/include/jmorecfg.h
+++ b/deps/jpeg-turbo/include/jmorecfg.h
@@ -100,11 +100,7 @@ typedef unsigned char UINT8;
 
 /* UINT16 must hold at least the values 0..65535. */
 
-#ifdef HAVE_UNSIGNED_SHORT
 typedef unsigned short UINT16;
-#else /* not HAVE_UNSIGNED_SHORT */
-typedef unsigned int UINT16;
-#endif /* HAVE_UNSIGNED_SHORT */
 
 /* INT16 must hold at least the values -32768..32767. */
 
diff --git a/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake b/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
index a24947aa..0cf26d76 100644
--- a/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
+++ b/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
@@ -7,7 +7,7 @@
 # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
 # The variable CVF_VERSION must be set before calling configure_file().
 
-set(PACKAGE_VERSION "2.1.2")
+set(PACKAGE_VERSION "2.1.3")
 
 if (PACKAGE_FIND_VERSION_RANGE)
   # Package version must be in the requested version range
diff --git a/deps/jpeg-turbo/lib/libjpeg.a b/deps/jpeg-turbo/lib/libjpeg.a
index a09283ae..f45f9f46 100644
Binary files a/deps/jpeg-turbo/lib/libjpeg.a and b/deps/jpeg-turbo/lib/libjpeg.a differ
diff --git a/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc b/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc
index b6900bc5..35f50d2d 100644
--- a/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc
+++ b/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc
@@ -5,6 +5,6 @@ includedir=${prefix}/include
 
 Name: libjpeg
 Description: A SIMD-accelerated JPEG codec that provides the libjpeg API
-Version: 2.1.2
+Version: 2.1.3
 Libs: -L${libdir} -ljpeg
 Cflags: -I${includedir}