remove-gets.patch 766 B

1234567891011121314151617181920
  1. ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
  2. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  3. Upstream-Status: Pending
  4. Index: tar-1.26/gnu/stdio.in.h
  5. ===================================================================
  6. --- tar-1.26.orig/gnu/stdio.in.h 2011-03-12 01:14:33.000000000 -0800
  7. +++ tar-1.26/gnu/stdio.in.h 2012-07-04 12:18:58.997081535 -0700
  8. @@ -163,8 +163,10 @@
  9. /* It is very rare that the developer ever has full control of stdin,
  10. so any use of gets warrants an unconditional warning. Assume it is
  11. always declared, since it is required by C89. */
  12. +#if defined gets
  13. #undef gets
  14. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  15. +#endif
  16. #if @GNULIB_FOPEN@
  17. # if @REPLACE_FOPEN@