Skip to content

Instantly share code, notes, and snippets.

@Ikke
Created January 31, 2016 17:18
Show Gist options
  • Save Ikke/8ef87507dbe35d81c781 to your computer and use it in GitHub Desktop.
Save Ikke/8ef87507dbe35d81c781 to your computer and use it in GitHub Desktop.
diff --git a/srclib/stdio.in.h b/srclib/stdio.in.h.new
index 473c84c..499b073 100644
--- a/srclib/stdio.in.h
+++ b/srclib/stdio.in.h
@@ -695,7 +695,9 @@ _GL_CXXALIASWARN (gets);
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
+ #if HAVE_RAW_DECL_GETS
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment