From owner-freebsd-questions Tue Feb 20 11:44: 8 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 CC6D937B67D for ; Tue, 20 Feb 2001 11:44:00 -0800 (PST) (envelope-from boynagar@armentel.com) Received: from user0000011909 (192.168.7.74 [192.168.7.74]) by mail1.armentel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 1HD0263Q; Mon, 19 Feb 2001 14:51:50 +0400 From: "Arthur Boynagryan" To: Subject: Alternative to gets() function? Date: Mon, 19 Feb 2001 14:52:57 +0400 Message-ID: <000401c09a62$1f1caf60$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) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal 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