ALT Linux Bugzilla
– Attachment 12915 Details for
Bug 45794
shadow: ошибка сборки с glibc 2.37
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
патч для исправления ошибки
0001-logoutd.c-fixed-compile-error-with-Werror.patch (text/plain), 1.63 KB, created by
Alexey Sheplyakov
on 2023-04-09 19:16:10 MSK
(
hide
)
Description:
патч для исправления ошибки
Filename:
MIME Type:
Creator:
Alexey Sheplyakov
Created:
2023-04-09 19:16:10 MSK
Size:
1.63 KB
patch
obsolete
>From 58a5adf9065e08beefad79993da9424e98fd3b8d Mon Sep 17 00:00:00 2001 >From: Steve Grubb <sgrubb@redhat.com> >Date: Fri, 18 Mar 2022 15:35:02 -0400 >Subject: [PATCH] logoutd.c: fixed compile error with -Werror > >gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../libmisc -DLOCALEDIR=\"/usr/share/locale\" -pipe -frecord-gcc-switches -Wall -g -O2 -Werror -Wno-error=address -Wno-error=cpp -DEXTRA_CHECK_HOME_DIR -c -o logoutd.o logoutd.c >logoutd.c: In function 'main': >logoutd.c:248:25: error: 'strcat' argument 2 declared attribute 'nonstring' [-Werror=stringop-overread] > 248 | strcat (tty_name, ut->ut_line); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >In file included from /usr/include/utmp.h:29, > from ../lib/prototypes.h:52, > from logoutd.c:42: >/usr/include/bits/utmp.h:62:8: note: argument 'ut_line' declared here > 62 | char ut_line[UT_LINESIZE] > | ^~~~~~~ >cc1: all warnings being treated as errors >make[2]: *** [Makefile:943: logoutd.o] Error 1 > >ut_line is declared as a nonstring in bits/utmp.h. It might not be NUL >terminated. Limit how much it copies to the size of the array. > >asheplyakov: improved the commit message >--- > shadow/src/logoutd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/shadow/src/logoutd.c b/shadow/src/logoutd.c >index 3fcb41f..1aef1c5 100644 >--- a/shadow/src/logoutd.c >+++ b/shadow/src/logoutd.c >@@ -245,7 +245,7 @@ int main (int argc, char **argv) > tty_name[0] = '\0'; > } > >- strcat (tty_name, ut->ut_line); >+ strncat (tty_name, ut->ut_line, UT_LINESIZE); > #ifndef O_NOCTTY > #define O_NOCTTY 0 > #endif >-- >2.33.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45794
: 12915