init - 初始化项目
This commit is contained in:
17
3rdparty/libpng/patches/20190528-fix-leak-png_handle_exif.diff
vendored
Normal file
17
3rdparty/libpng/patches/20190528-fix-leak-png_handle_exif.diff
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/3rdparty/libpng/pngrutil.c b/3rdparty/libpng/pngrutil.c
|
||||
index d5fa08c397..4db3de990b 100644
|
||||
--- a/3rdparty/libpng/pngrutil.c
|
||||
+++ b/3rdparty/libpng/pngrutil.c
|
||||
@@ -2087,10 +2087,8 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
}
|
||||
}
|
||||
|
||||
- if (png_crc_finish(png_ptr, 0) != 0)
|
||||
- return;
|
||||
-
|
||||
- png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
|
||||
+ if (png_crc_finish(png_ptr, 0) == 0)
|
||||
+ png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
|
||||
|
||||
png_free(png_ptr, info_ptr->eXIf_buf);
|
||||
info_ptr->eXIf_buf = NULL;
|
||||
53
3rdparty/libpng/patches/20190910-msa-patch.diff
vendored
Normal file
53
3rdparty/libpng/patches/20190910-msa-patch.diff
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
diff --git a/3rdparty/libpng/mips/mips_init.c b/3rdparty/libpng/mips/mips_init.c
|
||||
index 8dd283deef..6a061cccfa 100644
|
||||
--- a/3rdparty/libpng/mips/mips_init.c
|
||||
+++ b/3rdparty/libpng/mips/mips_init.c
|
||||
@@ -73,7 +73,6 @@ png_init_filter_functions_msa(png_structp pp, unsigned int bpp)
|
||||
* this case will fall through to the 'default' below, which just
|
||||
* returns.
|
||||
*/
|
||||
-#endif /* PNG_MIPS_MSA_API_SUPPORTED */
|
||||
#ifdef PNG_MIPS_MSA_CHECK_SUPPORTED
|
||||
{
|
||||
static volatile sig_atomic_t no_msa = -1; /* not checked */
|
||||
@@ -84,12 +83,9 @@ png_init_filter_functions_msa(png_structp pp, unsigned int bpp)
|
||||
if (no_msa)
|
||||
return;
|
||||
}
|
||||
-#ifdef PNG_MIPS_MSA_API_SUPPORTED
|
||||
- break;
|
||||
-#endif
|
||||
#endif /* PNG_MIPS_MSA_CHECK_SUPPORTED */
|
||||
+ break;
|
||||
|
||||
-#ifdef PNG_MIPS_MSA_API_SUPPORTED
|
||||
default: /* OFF or INVALID */
|
||||
return;
|
||||
|
||||
@@ -97,8 +93,6 @@ png_init_filter_functions_msa(png_structp pp, unsigned int bpp)
|
||||
/* Option turned on */
|
||||
break;
|
||||
}
|
||||
-#endif
|
||||
-
|
||||
/* IMPORTANT: any new external functions used here must be declared using
|
||||
* PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the
|
||||
* 'prefix' option to configure works:
|
||||
@@ -118,13 +112,16 @@ png_init_filter_functions_msa(png_structp pp, unsigned int bpp)
|
||||
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_msa;
|
||||
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_msa;
|
||||
}
|
||||
-
|
||||
else if (bpp == 4)
|
||||
{
|
||||
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_msa;
|
||||
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_msa;
|
||||
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_msa;
|
||||
}
|
||||
+#else
|
||||
+ (void)pp;
|
||||
+ (void)bpp;
|
||||
+#endif /* PNG_MIPS_MSA_API_SUPPORTED */
|
||||
}
|
||||
#endif /* PNG_MIPS_MSA_OPT > 0 */
|
||||
#endif /* READ */
|
||||
Reference in New Issue
Block a user