* The following bugs are resolved with this release:
- 3479, 5400, 6778, 6808, 9685, 11607, 13412, 13717, 13696, 13939, 14042,
- 14090, 14166, 14150, 14151, 14154, 14157, 14166, 14173, 14195, 14252,
- 14283, 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349,
- 14459, 14476, 14505, 14516, 14519, 14532, 14538
+ 3479, 5400, 6778, 6808, 9685, 9914, 11607, 13412, 13717, 13696, 13939,
+ 14042, 14090, 14166, 14150, 14151, 14154, 14157, 14166, 14173, 14195,
+ 14252, 14283, 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347,
+ 14349, 14459, 14476, 14505, 14516, 14519, 14532, 14538
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
#include "libioP.h"
#include <string.h>
#include <errno.h>
+#include <limits.h>
/* Read up to (and including) a TERMINATOR from FP into *LINEPTR
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
t = (char *) memchr ((void *) fp->_IO_read_ptr, delimiter, len);
if (t != NULL)
len = (t - fp->_IO_read_ptr) + 1;
- if (__builtin_expect (cur_len + len + 1 < 0, 0))
+ if (__builtin_expect (len >= SSIZE_MAX - cur_len, 0))
{
__set_errno (EOVERFLOW);
result = -1;