From 7f8a28efb5c9bf19d3a31a7f356cc171f333ceef Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Apr 2009 22:52:24 +0000 Subject: * sysdeps/unix/sysv/linux/preadv.c: The kernel API changed. Adjust. * sysdeps/unix/sysv/linux/pwritev.c: Likewise. 2009-04-23 Jakub Jelinek * sysdeps/posix/pwritev.c (PWRITEV): Fix up comment. Copy data from vector to temporary buffer and call PWRITEV after it instead of vice versa. * sysdeps/posix/preadv.c: Fix up comment. * misc/preadv.c: Likewise. * misc/preadv64.c: Likewise. * misc/pwritev.c: Likewise. * misc/pwritev64.c: Likewise. * misc/sys/uio.h (preadv, pwritev, preadv64, pwritev64): Likewise. 2009-04-23 Ulrich Drepper --- gshadow/sgetsgent_r.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gshadow') diff --git a/gshadow/sgetsgent_r.c b/gshadow/sgetsgent_r.c index 72c51fe26b..2292719af9 100644 --- a/gshadow/sgetsgent_r.c +++ b/gshadow/sgetsgent_r.c @@ -58,7 +58,12 @@ __sgetsgent_r (const char *string, struct sgrp *resbuf, char *buffer, { char *sp; if (string < buffer || string >= buffer + buflen) - sp = strncpy (buffer, string, buflen); + { + buffer[buflen - 1] = '\0'; + sp = strncpy (buffer, string, buflen); + if (buffer[buflen - 1] != '\0') + return ERANGE; + } else sp = (char *) string; -- cgit v1.2.1