[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gets() issue

From: Ivan Burbakov
Subject: gets() issue
Date: Mon, 19 Nov 2012 08:03:13 +0900

Building of some packages (inetutils, namely) with glibc-2.16 tends to
fail because this line:

/* It is very rare that the developer ever has full control of stdin,
   so any use of gets warrants an unconditional warning; besides, C11
   removed it.  */
#undef gets
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

Error message is "./stdio.h:1030:1: error: 'gets' undeclared here (not
in a function)"

There is full logs: https://gist.github.com/4107950

Alfred M. Szmidt and grep assured me, that inetutils doesn't use
gets(), and build can be easily fixed by just removing _GL_WARN_ON_USE
line from local stdio.in.h copy. But what is a proper fix?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]