代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/coreutils 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 11163675818ab877f20d3740a7c3e59d565b8e9c Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 6 Apr 2024 15:18:04 -0700
Subject: [PATCH] =?UTF-8?q?split:=20don=E2=80=99t=20trust=20st=5Fsize=20on?=
=?UTF-8?q?=20/proc=20files?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* src/split.c (create): Don’t trust st_size == 0.
---
src/split.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/split.c b/src/split.c
index 037960a59..f82a7f74b 100644
--- a/src/split.c
+++ b/src/split.c
@@ -489,10 +489,8 @@ create (char const *name)
if (psame_inode (&in_stat_buf, &out_stat_buf))
error (EXIT_FAILURE, 0, _("%s would overwrite input; aborting"),
quoteaf (name));
- bool regularish
- = S_ISREG (out_stat_buf.st_mode) || S_TYPEISSHM (&out_stat_buf);
- if (! (regularish && out_stat_buf.st_size == 0)
- && ftruncate (fd, 0) < 0 && regularish)
+ if (ftruncate (fd, 0) < 0
+ && (S_ISREG (out_stat_buf.st_mode) || S_TYPEISSHM (&out_stat_buf)))
error (EXIT_FAILURE, errno, _("%s: error truncating"), quotef (name));
return fd;
--
2.43.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。