X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fisrv_identd.c;h=59daf99ed5add314f8eaa97cb8e78991cc0c4377;hb=473dae080a8a0089d5d619a56d8943d131aa451e;hp=c230c7ec30c20eab0ec6b699a7f9e7f527b0a007;hpb=5a142025d372ae5dff7d7cf98f442edaafd1dc30;p=oweals%2Fbusybox.git diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index c230c7ec3..59daf99ed 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c @@ -19,7 +19,7 @@ typedef struct identd_buf_t { char buf[64 - 2*sizeof(int)]; } identd_buf_t; -static const char *bogouser = "nobody"; +#define bogouser bb_common_bufsiz1 static int new_peer(isrv_state_t *state, int fd) { @@ -108,8 +108,9 @@ int fakeidentd_main(int argc, char **argv) int fd; opt = getopt32(argc, argv, "fiwb:", &bind_address); - if (optind < argc) - bogouser = argv[optind]; + strcpy(bogouser, "nobody"); + if (argv[optind]) + strncpy(bogouser, argv[optind], sizeof(bogouser)); /* Daemonize if no -f and no -i and no -w */ if (!(opt & OPT_fiw));