加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Backport-JDK-8332866-Crash-in-ImageIO-JPEG-decoding-.patch 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
wuyafang 提交于 2024-10-14 11:38 . sync bishengjdk21 patches
Subject: Backport JDK-8332866 Crash in ImageIO JPEG decoding when MEM_STATS in enabled
---
src/java.desktop/share/native/libjavajpeg/imageioJPEG.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c b/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c
index c4c38dc0f..b4281458d 100644
--- a/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c
+++ b/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -666,8 +666,6 @@ static void imageio_reset(JNIEnv *env,
static void imageio_dispose(j_common_ptr info) {
if (info != NULL) {
- free(info->err);
- info->err = NULL;
if (info->is_decompressor) {
j_decompress_ptr dinfo = (j_decompress_ptr) info;
free(dinfo->src);
@@ -678,6 +676,8 @@ static void imageio_dispose(j_common_ptr info) {
cinfo->dest = NULL;
}
jpeg_destroy(info);
+ free(info->err);
+ info->err = NULL;
free(info);
}
}
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化