summaryrefslogtreecommitdiff
path: root/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-scanf.patch
blob: a2561b23206f6f408f517f6b3809e487b592e34c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 0e71deb..e18a6c3 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2006, 2007, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2007, 2010, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -274,7 +274,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
 	  CHAR_T *old = wp;						    \
 	  size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax			    \
 			    ? UCHAR_MAX + 1 : 2 * wpmax);		    \
-	  if (use_malloc || __libc_use_alloca (newsize))		    \
+	  if (use_malloc || !__libc_use_alloca (newsize))		    \
 	    {								    \
 	      wp = realloc (use_malloc ? wp : NULL, newsize);		    \
 	      if (wp == NULL)						    \