|
|
f96e0b |
From 44fc4a3f10e315aecc593f0642e1fbccbb466bc9 Mon Sep 17 00:00:00 2001
|
|
|
f96e0b |
From: Colin Watson <cjwatson@ubuntu.com>
|
|
|
f96e0b |
Date: Fri, 28 Dec 2012 06:43:35 +0000
|
|
|
f96e0b |
Subject: [PATCH 070/482] Backport gnulib fixes for C11. Fixes Savannah bug
|
|
|
f96e0b |
#37738.
|
|
|
f96e0b |
|
|
|
f96e0b |
* grub-core/gnulib/stdio.in.h (gets): Warn on use only if
|
|
|
f96e0b |
HAVE_RAW_DECL_GETS.
|
|
|
f96e0b |
* m4/stdio_h.m4 (gl_STDIO_H): Check for gets.
|
|
|
f96e0b |
---
|
|
|
f96e0b |
ChangeLog | 8 ++++++++
|
|
|
f96e0b |
grub-core/gnulib/stdio.in.h | 6 ++++--
|
|
|
f96e0b |
m4/stdio_h.m4 | 2 +-
|
|
|
f96e0b |
3 files changed, 13 insertions(+), 3 deletions(-)
|
|
|
f96e0b |
|
|
|
f96e0b |
diff --git a/ChangeLog b/ChangeLog
|
|
|
f96e0b |
index 9104a46..0f04f5c 100644
|
|
|
f96e0b |
--- a/ChangeLog
|
|
|
f96e0b |
+++ b/ChangeLog
|
|
|
f96e0b |
@@ -1,3 +1,11 @@
|
|
|
f96e0b |
+2012-12-28 Colin Watson <cjwatson@ubuntu.com>
|
|
|
f96e0b |
+
|
|
|
f96e0b |
+ Backport gnulib fixes for C11. Fixes Savannah bug #37738.
|
|
|
f96e0b |
+
|
|
|
f96e0b |
+ * grub-core/gnulib/stdio.in.h (gets): Warn on use only if
|
|
|
f96e0b |
+ HAVE_RAW_DECL_GETS.
|
|
|
f96e0b |
+ * m4/stdio_h.m4 (gl_STDIO_H): Check for gets.
|
|
|
f96e0b |
+
|
|
|
f96e0b |
2012-12-11 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
|
|
|
f96e0b |
* util/grub.d/20_linux_xen.in: Addmissing assignment to machine.
|
|
|
f96e0b |
diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
|
|
|
f96e0b |
index 80b9dbf..a8b00c6 100644
|
|
|
f96e0b |
--- a/grub-core/gnulib/stdio.in.h
|
|
|
f96e0b |
+++ b/grub-core/gnulib/stdio.in.h
|
|
|
f96e0b |
@@ -138,10 +138,12 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
|
|
|
f96e0b |
#endif
|
|
|
f96e0b |
|
|
|
f96e0b |
/* It is very rare that the developer ever has full control of stdin,
|
|
|
f96e0b |
- so any use of gets warrants an unconditional warning. Assume it is
|
|
|
f96e0b |
- always declared, since it is required by C89. */
|
|
|
f96e0b |
+ so any use of gets warrants an unconditional warning; besides, C11
|
|
|
f96e0b |
+ removed it. */
|
|
|
f96e0b |
#undef gets
|
|
|
f96e0b |
+#if HAVE_RAW_DECL_GETS
|
|
|
f96e0b |
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
|
|
f96e0b |
+#endif
|
|
|
f96e0b |
|
|
|
f96e0b |
#if @GNULIB_FOPEN@
|
|
|
f96e0b |
# if @REPLACE_FOPEN@
|
|
|
f96e0b |
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
|
|
|
f96e0b |
index f5650cd..8458bec 100644
|
|
|
f96e0b |
--- a/m4/stdio_h.m4
|
|
|
f96e0b |
+++ b/m4/stdio_h.m4
|
|
|
f96e0b |
@@ -37,7 +37,7 @@ AC_DEFUN([gl_STDIO_H],
|
|
|
f96e0b |
dnl corresponding gnulib module is not in use, and which is not
|
|
|
f96e0b |
dnl guaranteed by C89.
|
|
|
f96e0b |
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
|
|
|
f96e0b |
- ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
|
|
|
f96e0b |
+ ]], [dprintf fpurge fseeko ftello getdelim getline gets popen renameat
|
|
|
f96e0b |
snprintf tmpfile vdprintf vsnprintf])
|
|
|
f96e0b |
])
|
|
|
f96e0b |
|
|
|
f96e0b |
--
|
|
|
f96e0b |
1.8.2.1
|
|
|
f96e0b |
|