From d2f07bb7656cd46a93bdaac1d77bfa1c412d8c0c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Oct 2000 05:05:35 +0000 Subject: don't use gets() ! (This used to be commit e4ea0a5975d3539803c78cac2229550a6e89c4b4) --- source3/utils/smbcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 306f7ee269..62019d4036 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -248,10 +248,10 @@ static BOOL do_command(char *dest, char *msg_name, char *params) int myargc; printf("smbcontrol> "); - if (!gets(temp)) break; + if (!fgets(temp, sizeof(temp)-1, stdin)) break; myargc = 0; while ((myargc < 3) && - (myargv[myargc] = strtok(myargc?NULL:temp," \t"))) { + (myargv[myargc] = strtok(myargc?NULL:temp," \t\n"))) { myargc++; } if (!myargc) break; -- cgit