代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/ghostscript 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From bbd106e8f9345296cb5b5a452487bda603d54173 Mon Sep 17 00:00:00 2001
From: Chris Liddell <chris.liddell@artifex.com>
Date: Mon, 21 Sep 2020 22:16:34 +0100
Subject: [PATCH] oss-fuzz 23637: Fix error code confusion
Confusion of error codes meant we were allocating space for glyph data,
but never copying the data into it. Thus the memory sanitizer error.
---
psi/zfapi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/psi/zfapi.c b/psi/zfapi.c
index aa988ed6e..d38f56498 100644
--- a/psi/zfapi.c
+++ b/psi/zfapi.c
@@ -2118,15 +2118,14 @@ FAPI_FF_get_glyph(gs_fapi_font *ff, gs_glyph char_code, byte *buf, int buf_lengt
}
else {
ulong noffs, endoffs;
- int code;
/* If we haven't got a len_glyphs array, try using the offset of the next glyph offset
* to work out the length
*/
error = sfnt_get_glyph_offset(pdr, pfont42, char_code + 1, &noffs);
if (error == 0) {
glyph_length = noffs - offset0;
- code = sfnt_get_sfnt_length(pdr, &endoffs);
- if (code < 0) {
+ error = sfnt_get_sfnt_length(pdr, &endoffs);
+ if (error < 0) {
glyph_length = gs_fapi_glyph_invalid_index;
}
else {
@@ -2139,8 +2138,8 @@ FAPI_FF_get_glyph(gs_fapi_font *ff, gs_glyph char_code, byte *buf, int buf_lengt
/* And if we can't get the next glyph offset, use the end of the sfnt data
* to work out the length.
*/
- code = sfnt_get_sfnt_length(pdr, &noffs);
- if (code < 0) {
+ error = sfnt_get_sfnt_length(pdr, &noffs);
+ if (error < 0) {
glyph_length = gs_fapi_glyph_invalid_index;
}
else {
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。