1 Star 0 Fork 31

futa/ghostscript

forked from src-openEuler/ghostscript 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Bug-702320-Valgrind-complains-about-UMR.patch 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
wangchen 提交于 2020-09-03 15:54 +08:00 . Sync some patches from community
From b503c46c124cf5aaa82a71e28f624f2ef2b71e71 Mon Sep 17 00:00:00 2001
From: ray <Ray.Johnston@artifex.com>
Date: Fri, 10 Apr 2020 15:35:02 -0700
Subject: [PATCH] Bug 702320: Valgrind complains about UMR.
The file for this bug does show that the stroke_color stack based struct
in not initialized. Init fill_color and stroke_color. This is probably a
bug tail from the fill_stroke commit.
Also explicitly set 'zeros' to 0 to clarify the expected contents.
---
base/gxclbits.c | 3 +--
base/gxclrast.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/base/gxclbits.c b/base/gxclbits.c
index 3c65af9..519cdac 100644
--- a/base/gxclbits.c
+++ b/base/gxclbits.c
@@ -82,7 +82,7 @@ go_process(stream_state * st, stream_cursor_read *pr, stream_cursor_write *pw, b
return -1;
return 0;
}
-static byte zeros[1<<align_bitmap_mod];
+static byte zeros[1<<align_bitmap_mod] = { 0, };
static int
cmd_compress_bitmap(stream_state * st, const byte * data, uint width_bits,
uint raster, uint height, stream_cursor_write * pw)
@@ -110,7 +110,6 @@ cmd_compress_bitmap(stream_state * st, const byte * data, uint width_bits,
byte b = r.ptr[1] & mask;
r2.limit = &b;
r2.ptr = r2.limit-1;
-
status = go_process(st, &r2, pw, false);
if (status)
break;
diff --git a/base/gxclrast.c b/base/gxclrast.c
index 4d91fa4..4e75d3e 100644
--- a/base/gxclrast.c
+++ b/base/gxclrast.c
@@ -510,8 +510,8 @@ clist_playback_band(clist_playback_action playback_action,
} clip_save;
bool in_clip = false;
gs_gstate gs_gstate;
- gx_device_color fill_color;
- gx_device_color stroke_color;
+ gx_device_color fill_color = { 0 };
+ gx_device_color stroke_color = { 0 };
float dash_pattern[cmd_max_dash];
gx_fill_params fill_params;
gx_stroke_params stroke_params;
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/funited/ghostscript.git
git@gitee.com:funited/ghostscript.git
funited
ghostscript
ghostscript
master

搜索帮助