From d4bc783bf1b4ec05fcbc49f93b20b5e3199c23e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Apr 1999 17:11:12 +0000 Subject: [PATCH] Update. * wcsmbs/mbsrtowcs.c (__mbsrtowcs): Correctly initialize outbufend for dst==NULL. Fixes PR libc/1084. --- ChangeLog | 4 ++++ wcsmbs/mbsrtowcs.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb3bf38b4f..ffdb41935d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-04-18 Ulrich Drepper + * wcsmbs/mbsrtowcs.c (__mbsrtowcs): Correctly initialize outbufend + for dst==NULL. + Fixes PR libc/1084. + * socket/sys/socket.h: Define SHUT_RD, SHUT_WR, and SHUT_RDWR. Fixes PR libc/1083. diff --git a/wcsmbs/mbsrtowcs.c b/wcsmbs/mbsrtowcs.c index a10eb85f1a..84b7a3883b 100644 --- a/wcsmbs/mbsrtowcs.c +++ b/wcsmbs/mbsrtowcs.c @@ -1,6 +1,6 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1996. + Contributed by Ulrich Drepper , 1996. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -61,7 +61,7 @@ __mbsrtowcs (dst, src, len, ps) const unsigned char *inbuf = (const unsigned char *) *src; const unsigned char *srcend = inbuf + strlen (inbuf) + 1; - data.outbufend = data.outbuf + sizeof (buf); + data.outbufend = (char *) buf + sizeof (buf); do { data.outbuf = (char *) buf;