代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/sane-backends 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d7bd15792ea3d2613aa5a0b09d948dc2ef77dfcf Mon Sep 17 00:00:00 2001
From: lingsheng <lingsheng@huawei.com>
Date: Wed, 27 Jan 2021 15:00:32 +0800
Subject: [PATCH] Add check for ports to avoid Segmentation fault
---
tools/umax_pp.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tools/umax_pp.c b/tools/umax_pp.c
index 7b127e3..00ffea9 100644
--- a/tools/umax_pp.c
+++ b/tools/umax_pp.c
@@ -355,12 +355,15 @@ main (int argc, char **argv)
if (rc != 1)
{
ports = sanei_parport_find_port ();
- i = 0;
- rc = 0;
- while ((ports[i] != NULL) && (rc != 1))
+ if (ports != NULL)
{
- rc = sanei_umax_pp_initPort (strtol (ports[i], NULL, 16), NULL);
- i++;
+ i = 0;
+ rc = 0;
+ while ((ports[i] != NULL) && (rc != 1))
+ {
+ rc = sanei_umax_pp_initPort (strtol (ports[i], NULL, 16), NULL);
+ i++;
+ }
}
}
if (rc != 1)
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。