Dr. Werner Fink 2012-06-06 11:18:57 +00:00 committed by Git OBS Bridge
parent c231f1bc93
commit 53c3adfc62
2 changed files with 9 additions and 3 deletions

View File

@ -16,9 +16,9 @@
- printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, u->ut_line);
+ int utlnlen = 8;
+ if (formtype > 1) {
+ userlen = UT_NAMESIZE;
+ fromlen = UT_HOSTSIZE;
+ utlnlen = UT_LINESIZE;
+ userlen = strnlen(uname, UT_NAMESIZE);
+ fromlen = strnlen(u->ut_host, UT_HOSTSIZE);
+ utlnlen = strnlen(u->ut_line, UT_LINESIZE);
+ }
+ printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, u->ut_line);
if (from)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 6 11:17:37 UTC 2012 - werner@suse.de
- Make our w-notruncate patch file lines dynamically that is use
the string and not the umtp field lengths
-------------------------------------------------------------------
Wed Jun 6 10:35:41 UTC 2012 - werner@suse.de