summaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-10-30 16:11:14 +0100
committerAndreas Schwab <schwab@redhat.com>2009-10-30 16:11:14 +0100
commit017dd87448e913383a8be5773569f218e8c661c5 (patch)
treed9124fdbb290416e60553c87aa9f9f1750d7acb8 /libio
parentf8e81cec78280ef92014305c1e10a808b1260683 (diff)
parent3a83202db6e5591f2b72974c1ad98602c6620770 (diff)
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'libio')
-rw-r--r--libio/ioputs.c5
-rw-r--r--libio/oldtmpfile.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/libio/ioputs.c b/libio/ioputs.c
index 2f43e994e3..7fa5db5f1f 100644
--- a/libio/ioputs.c
+++ b/libio/ioputs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1996-1999,2003,2009 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
@@ -27,6 +27,7 @@
#include "libioP.h"
#include <string.h>
+#include <limits.h>
int
_IO_puts (str)
@@ -40,7 +41,7 @@ _IO_puts (str)
|| _IO_fwide (_IO_stdout, -1) == -1)
&& _IO_sputn (_IO_stdout, str, len) == len
&& _IO_putc_unlocked ('\n', _IO_stdout) != EOF)
- result = len + 1;
+ result = MIN (INT_MAX, len + 1);
_IO_release_lock (_IO_stdout);
return result;
diff --git a/libio/oldtmpfile.c b/libio/oldtmpfile.c
index d85467a392..c9e4750cba 100644
--- a/libio/oldtmpfile.c
+++ b/libio/oldtmpfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1993,1996-2000,2003,2004,2007
+/* Copyright (C) 1991,1993,1996-2000,2003,2004,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -39,7 +39,7 @@ __old_tmpfile (void)
if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
return NULL;
- fd = __gen_tempname (buf, 0, __GT_FILE);
+ fd = __gen_tempname (buf, 0, 0, __GT_FILE);
if (fd < 0)
return NULL;