1998-04-15  Ulrich Drepper  <drepper@cygnus.com>

	* iconv/gconv_simple.c (__gconv_transform_ucs4_ascii): Fix typo in
	last change.

1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/dl-minimal.c (__strtol_internal): Correct range check.  Fix
	return value on overflow.

1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/posix/mkstemp.c (mkstemp): Change value and v to 64
	bits.

1998-04-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* malloc/mtrace.c (mtrace): Use standard function setvbuf instead
	of non-standard function setbuffer.

1998-04-15  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* stdio-common/perror.c: Include <string.h> for __strerror_r.
This commit is contained in:
Ulrich Drepper 1998-04-15 10:15:16 +00:00
parent 480bc72713
commit 479e9b3f21
6 changed files with 33 additions and 11 deletions

View File

@ -1,3 +1,27 @@
1998-04-15 Ulrich Drepper <drepper@cygnus.com>
* iconv/gconv_simple.c (__gconv_transform_ucs4_ascii): Fix typo in
last change.
1998-04-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-minimal.c (__strtol_internal): Correct range check. Fix
return value on overflow.
1998-04-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/posix/mkstemp.c (mkstemp): Change value and v to 64
bits.
1998-04-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/mtrace.c (mtrace): Use standard function setvbuf instead
of non-standard function setbuffer.
1998-04-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* stdio-common/perror.c: Include <string.h> for __strerror_r.
1998-04-14 23:54 Ulrich Drepper <drepper@cygnus.com> 1998-04-14 23:54 Ulrich Drepper <drepper@cygnus.com>
* iconvdata/Makefile: Add rules to run tests. * iconvdata/Makefile: Add rules to run tests.

View File

@ -247,15 +247,12 @@ __strtol_internal (const char *nptr, char **endptr, int base, int group)
{ {
unsigned long int digval = *nptr - '0'; unsigned long int digval = *nptr - '0';
if (result > LONG_MAX / 10 if (result > LONG_MAX / 10
|| (result == (sign || (sign > 0 ? result == LONG_MAX / 10 && digval > LONG_MAX % 10
? (unsigned long int) LONG_MAX : (result == ((unsigned long int) LONG_MAX + 1) / 10
: (unsigned long int) LONG_MAX + 1) / 10 && digval > ((unsigned long int) LONG_MAX + 1) % 10)))
&& digval > (sign
? (unsigned long int) LONG_MAX
: (unsigned long int) LONG_MAX + 1) % 10))
{ {
errno = ERANGE; errno = ERANGE;
return LONG_MAX * sign; return sign > 0 ? LONG_MAX : LONG_MIN;
} }
result *= 10; result *= 10;
result += digval; result += digval;

View File

@ -239,7 +239,7 @@ __gconv_transform_ucs4_ascii (struct gconv_step *step,
size_t cnt = 0; size_t cnt = 0;
while (data->outbufavail < data->outbufsize while (data->outbufavail < data->outbufsize
&& cnt + sizeof (wchar_t) + 3 < *inlen) && cnt + 3 < *inlen)
{ {
if (*newinbuf < L'\0' || *newinbuf > L'\x7f') if (*newinbuf < L'\0' || *newinbuf > L'\x7f')
{ {

View File

@ -244,7 +244,7 @@ mtrace ()
if (mallstream != NULL) if (mallstream != NULL)
{ {
/* Be sure it doesn't malloc its buffer! */ /* Be sure it doesn't malloc its buffer! */
setbuffer (mallstream, malloc_trace_buffer, TRACE_BUFFER_SIZE); setvbuf (mallstream, malloc_trace_buffer, _IOFBF, TRACE_BUFFER_SIZE);
fprintf (mallstream, "= Start\n"); fprintf (mallstream, "= Start\n");
tr_old_free_hook = __free_hook; tr_old_free_hook = __free_hook;
__free_hook = tr_freehook; __free_hook = tr_freehook;

View File

@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <errno.h> #include <errno.h>
/* Print a line on stderr consisting of the text in S, a colon, a space, /* Print a line on stderr consisting of the text in S, a colon, a space,

View File

@ -35,7 +35,7 @@ mkstemp (template)
{ {
static const char letters[] static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
static uint32_t value; static uint64_t value;
struct timeval tv; struct timeval tv;
char *XXXXXX; char *XXXXXX;
size_t len; size_t len;
@ -57,7 +57,7 @@ mkstemp (template)
for (count = 0; count < TMP_MAX; ++count) for (count = 0; count < TMP_MAX; ++count)
{ {
uint32_t v = value; uint64_t v = value;
int fd; int fd;
/* Fill in the random bits. */ /* Fill in the random bits. */