diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-01 00:39:56 +0400 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-01 00:39:56 +0400 |
commit | 02e6ba91e887bd11146a57185b223582f56f3f09 (patch) | |
tree | cc1954165fe7e6efed1ba0dfa7d5c3aea97fffa5 /sysklogd | |
parent | a6f6e06107e69b79858acaa511c452a0a73cf207 (diff) |
Vodz' last_patch57:
Hi, Erik.
my_getpw(uid/gid) and applets used it have problem:
if username for uid not found, applets can`t detect it
(but code pessent). Also "%8ld " format is bad:
spaces not required (applets have self format
or spec format (tar applet) and overflow for "id" applet...)
This problem also pressent in stable version.
Patch for unstable in attach.
--w
vodz
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/logger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 380bde5ca..4aa15101a 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -121,7 +121,7 @@ extern int logger_main(int argc, char **argv) pri = pencode(optarg); break; case 't': - strncpy(name, optarg, sizeof(name)); + safe_strncpy(name, optarg, sizeof(name)); break; default: show_usage(); @@ -144,7 +144,7 @@ extern int logger_main(int argc, char **argv) } while (c != EOF); } else { len = 1; /* for the '\0' */ - message=xcalloc(1, 1); + message = xcalloc(1, 1); for (i = optind; i < argc; i++) { len += strlen(argv[i]); len += 1; /* for the space between the args */ @@ -152,7 +152,7 @@ extern int logger_main(int argc, char **argv) strcat(message, argv[i]); strcat(message, " "); } - message[strlen(message)-1] = '\0'; + message[strlen(message) - 2] = '\0'; syslog(pri, "%s", message); } |