From owner-freebsd-questions Tue Feb 20 11:43:59 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail1.armentel.com (mail1.armentel.com [212.73.65.12]) by hub.freebsd.org (Postfix) with ESMTP id 425EC37B503 for ; Tue, 20 Feb 2001 11:43:55 -0800 (PST) (envelope-from boynagar@armentel.com) Received: from user0000011909 (USER-0000011909 [192.168.7.74]) by mail1.armentel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 1HD02707; Tue, 20 Feb 2001 09:54:04 +0400 From: "Arthur Boynagryan" To: Subject: Alternative to gets() function? Date: Tue, 20 Feb 2001 09:55:12 +0400 Message-ID: <000001c09b01$b1865fa0$4a07a8c0@user0000011909> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Disposition-Notification-To: "Arthur Boynagryan" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all! I've been reading man page for gets() and fgets() and noticed the following: "Since it is usually impossible to ensure that the next input line is less than some arbitrary length, and because overflowing the input buffer is almost invariably a security violation, programs should NEVER use gets()." What can you recommend instead of gets()? Does this also apply to fgets()? I'm mostly interested in fgets(). TIA, Arthur To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message