Files
diod/libnpclient-noinline-npc_gets.patch
Ana Guerrero bced0694f6 - attempt to workaround gcc-15 -Werror=stringop-overflow failure
* add libnpclient-noinline-npc_gets.patch (boo#1255799)
- Track dropped configs as ghost files
- Specify --with-systemdsystemunitdir during configure
- Drop diodmount rename, unneeded following upstream commit a6a077e
- Add libcap dependency and drop unused libpcap
- Rebase harden_diod.service.patch
- Upgrade Lua version dependency to 1.3 (boo#1255720)
- Drop optional tcmalloc dependency
- Update to version 1.1.0+0.ga32f5a4:
  * protocol.md: fix document links
  * update README.md for 1.1.0
  * scripts: add missing debian dependency
  * NEWS.md: add release notes for 1.1.0
  * add script to generate release notes
  * testsuite: fix test output typo
  * reorganize project metadata
  * testsuite: temporarily disable security XATTR test
  * diodcli: fix compliation issue on aarch64
  * git: drop check in tests/kern
  * .gitignore: remove ancient paths
  * testsuite: drop third party tests
  * testsuite: drop duplicate mode test
  * testsuite: drop duplicate fsync test
  * testsuite: migrate atomic create test to sharness
  * testsuite: migrate create test to sharness
  * testsuite: migrate xattr tests to sharness
  * testsuite: migrate flock tests to sharness
  * testsuite: drop duplicate rename test
  * testsuite: migrate sgid dir test to sharness

OBS-URL: https://build.opensuse.org/package/show/filesystems/diod?expand=0&rev=11
2026-01-06 12:46:23 +00:00

42 lines
1.4 KiB
Diff

From 600c3c3002bb3e2c1a6516943486eb94fe62d9f5 Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Wed, 31 Dec 2025 13:07:12 +0100
Subject: [PATCH] libnpclient: noinline npc_gets
gcc-15 Factory builds are failing with:
[ 20s] In function 'npc_gets',
[ 20s] inlined from 'cmd_showmount' at diodcli.c:496:12:
[ 20s] ../libnpclient/read.c:218:19: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
[ 20s] 218 | buf[done] = '\0';
[ 20s] | ^
[ 20s] diodcli.c: In function 'cmd_showmount':
[ 20s] diodcli.c:465:10: note: at offset [-2147483648, -1] into destination object 'buf' of size 80
[ 20s] 465 | char buf[80], *host, *p;
[ 20s] | ^
[ 21s] lto1: all warnings being treated as errors
I've taken a quick look, and don't think that 'done' can cause a 'buf'
overrun here, but I may be wrong (the code is pretty hairy).
Attempt to workaround the compiler error by avoiding npc_gets inlining.
---
src/libnpclient/read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libnpclient/read.c b/src/libnpclient/read.c
index cbc78bc..e94ef09 100644
--- a/src/libnpclient/read.c
+++ b/src/libnpclient/read.c
@@ -190,7 +190,7 @@ _strnchr (char *s, char c, int len)
return NULL;
}
-char *
+char * __attribute__ ((noinline))
npc_gets(Npcfid *fid, char *buf, u32 count)
{
int n = 0, done = 0, extra = 0;
--
2.52.0