summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-05-05 14:50:16 +0000
committerJakub Jelinek <jakub@redhat.com>2006-05-05 14:50:16 +0000
commit262cf6b3df91d5bb7cbdcae2390333b21e8008d5 (patch)
treee08285b4eb00fcd3b961f02426120607e17d7ca7
parent3f898a85fc15daad530ca7db852e7d724e3914b5 (diff)
Updated to fedora-glibc-20060505T1443cvs/fedora-glibc-2_4_90-6
-rw-r--r--ChangeLog14
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in8
-rw-r--r--locale/programs/ld-address.c3
-rw-r--r--nis/nis_table.c75
-rw-r--r--stdio-common/tst-printf.sh8
6 files changed, 72 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a0eb1234e..8c427ac75c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
+2006-05-05 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #2509]
+ * stdio-common/tst-printf.sh: Adjust for tst-printf.c change even
+ on 32-bit arches.
+
+2006-05-05 Ulrich Drepper <drepper@redhat.com>
+
+ * locale/programs/ld-address.c (address_finish): Fix one more
+ place where the iso639 array might be access beyond the limits.
+
2006-05-04 Ulrich Drepper <drepper@redhat.com>
+ * nis/nis_table.c (nis_list): Avoid clearing res twice before
+ filling it for the first time.
+
* nis/nis_table.c (get_tablepath): Renamed from __get_tablepath.
Adjust all callers.
Free res object content before returning.
diff --git a/fedora/branch.mk b/fedora/branch.mk
index f6f2a0acd4..3c205c2369 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-fc4
-fedora-sync-date := 2006-05-05 05:54 UTC
-fedora-sync-tag := fedora-glibc-20060505T0554
+fedora-sync-date := 2006-05-05 14:43 UTC
+fedora-sync-tag := fedora-glibc-20060505T1443
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index a648725749..4dd9774515 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 5
+%define glibcrelease 6
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define prelinkarches noarch
%define xenarches i686 athlon
@@ -1074,7 +1074,7 @@ cp crypt/README.ufc-crypt documentation/README.ufc-crypt
cp timezone/README documentation/README.timezone
cp ChangeLog{,.15,.16} documentation
bzip2 -9 documentation/ChangeLog*
-cp ../posix/gai.conf documentation/
+cp posix/gai.conf documentation/
%ifarch s390x
# Compatibility symlink
@@ -1392,6 +1392,10 @@ rm -f *.filelist*
%endif
%changelog
+* Fri May 5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-6
+- update from CVS
+- rebuilt using fixed rpm
+
* Fri May 5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-5
- update from CVS
- some NIS+ fixes
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c
index 83cd9fa17b..dac8551071 100644
--- a/locale/programs/ld-address.c
+++ b/locale/programs/ld-address.c
@@ -237,7 +237,8 @@ No definition for %s category found"), "LC_ADDRESS"));
WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"),
"LC_ADDRESS", "lang_ab"));
}
- else if (iso639[cnt].ab[0] == '\0')
+ else if (cnt < sizeof (iso639) / sizeof (iso639[0])
+ && iso639[cnt].ab[0] == '\0')
{
WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be defined"),
"LC_ADDRESS", "lang_ab"));
diff --git a/nis/nis_table.c b/nis/nis_table.c
index 1a7bf094f0..eddba67dda 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -25,7 +25,7 @@
static struct ib_request *
-__create_ib_request (const_nis_name name, unsigned int flags)
+create_ib_request (const_nis_name name, unsigned int flags)
{
struct ib_request *ibreq = calloc (1, sizeof (struct ib_request));
nis_attr *search_val = NULL;
@@ -91,13 +91,13 @@ __create_ib_request (const_nis_name name, unsigned int flags)
if (cptr != NULL)
*cptr++ = '\0';
- if (!val)
+ if (__builtin_expect (val == NULL, 0))
{
nis_free_request (ibreq);
return NULL;
}
*val++ = '\0';
- if ((search_len + 1) >= size)
+ if (search_len + 1 >= size)
{
size += 1;
nis_attr *newp = realloc (search_val, size * sizeof (nis_attr));
@@ -106,7 +106,7 @@ __create_ib_request (const_nis_name name, unsigned int flags)
search_val = newp;
}
search_val[search_len].zattr_ndx = strdup (key);
- if ((search_val[search_len].zattr_ndx) == NULL)
+ if (search_val[search_len].zattr_ndx == NULL)
goto free_null;
search_val[search_len].zattr_val.zattr_val_len = strlen (val) + 1;
@@ -167,7 +167,7 @@ nis_list (const_nis_name name, unsigned int flags,
const void *userdata),
const void *userdata)
{
- nis_result *res = calloc (1, sizeof (nis_result));
+ nis_result *res = malloc (sizeof (nis_result));
ib_request *ibreq;
int status;
enum clnt_stat clnt_status;
@@ -186,14 +186,18 @@ nis_list (const_nis_name name, unsigned int flags,
if (name == NULL)
{
- NIS_RES_STATUS (res) = NIS_BADNAME;
+ status = NIS_BADNAME;
+ err_out:
+ memset (res, '\0', sizeof (nis_result));
+ NIS_RES_STATUS (res) = status;
return res;
}
- if ((ibreq = __create_ib_request (name, flags)) == NULL)
+ ibreq = create_ib_request (name, flags);
+ if (ibreq == NULL)
{
- NIS_RES_STATUS (res) = NIS_BADNAME;
- return res;
+ status = NIS_BADNAME;
+ goto err_out;
}
if ((flags & EXPAND_NAME)
@@ -205,16 +209,16 @@ nis_list (const_nis_name name, unsigned int flags,
if (names == NULL)
{
nis_free_request (ibreq);
- NIS_RES_STATUS (res) = NIS_BADNAME;
- return res;
+ status = NIS_BADNAME;
+ goto err_out;
}
ibreq->ibr_name = strdup (names[name_nr]);
if (ibreq->ibr_name == NULL)
{
nis_freenames (names);
nis_free_request (ibreq);
- NIS_RES_STATUS (res) = NIS_NOMEMORY;
- return res;
+ status = NIS_NOMEMORY;
+ goto err_out;
}
}
else
@@ -241,14 +245,14 @@ nis_list (const_nis_name name, unsigned int flags,
status = __nisbind_create (&bptr, dir->do_servers.do_servers_val,
dir->do_servers.do_servers_len, flags);
- if (status != NIS_SUCCESS)
+ if (__builtin_expect (status != NIS_SUCCESS, 0))
{
NIS_RES_STATUS (res) = status;
goto fail2;
}
while (__nisbind_connect (&bptr) != NIS_SUCCESS)
- if (__nisbind_next (&bptr) != NIS_SUCCESS)
+ if (__builtin_expect (__nisbind_next (&bptr) != NIS_SUCCESS, 0))
{
NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE;
goto fail;
@@ -267,7 +271,7 @@ nis_list (const_nis_name name, unsigned int flags,
(xdrproc_t) _xdr_nis_result,
(caddr_t) res, RPCTIMEOUT);
- if (clnt_status != RPC_SUCCESS)
+ if (__builtin_expect (clnt_status != RPC_SUCCESS, 0))
NIS_RES_STATUS (res) = NIS_RPCERROR;
else
switch (NIS_RES_STATUS (res))
@@ -281,7 +285,7 @@ nis_list (const_nis_name name, unsigned int flags,
free (ibreq->ibr_name);
ibreq->ibr_name = NULL;
/* If we hit the link limit, bail. */
- if (count_links > NIS_MAXLINKS)
+ if (__builtin_expect (count_links > NIS_MAXLINKS, 0))
{
NIS_RES_STATUS (res) = NIS_LINKNAMEERROR;
++done;
@@ -459,7 +463,7 @@ nis_list (const_nis_name name, unsigned int flags,
/* Try the next domainname if we don't follow a link. */
free (ibreq->ibr_name);
ibreq->ibr_name = NULL;
- if (count_links)
+ if (__builtin_expect (count_links, 0))
{
NIS_RES_STATUS (res) = NIS_LINKNAMEERROR;
++done;
@@ -520,11 +524,7 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
return res;
}
- size_t namelen = strlen (name);
- char buf1[namelen + 20];
- char buf4[namelen + 20];
-
- ib_request *ibreq = __create_ib_request (name, flags);
+ ib_request *ibreq = create_ib_request (name, flags);
if (ibreq == NULL)
{
NIS_RES_STATUS (res) = NIS_BADNAME;
@@ -534,6 +534,10 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
nis_object obj;
memcpy (&obj, obj2, sizeof (nis_object));
+ size_t namelen = strlen (name);
+ char buf1[namelen + 20];
+ char buf4[namelen + 20];
+
if (obj.zo_name == NULL || strlen (obj.zo_name) == 0)
obj.zo_name = nis_leaf_of_r (name, buf1, sizeof (buf1));
@@ -559,7 +563,7 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
(caddr_t) ibreq,
(xdrproc_t) _xdr_nis_result,
(caddr_t) res, 0, NULL);
- if (status != NIS_SUCCESS)
+ if (__builtin_expect (status != NIS_SUCCESS, 0))
NIS_RES_STATUS (res) = status;
nis_free_request (ibreq);
@@ -583,7 +587,8 @@ nis_modify_entry (const_nis_name name, const nis_object *obj2,
if (res == NULL)
return NULL;
- if (( ibreq =__create_ib_request (name, flags)) == NULL)
+ ibreq = create_ib_request (name, flags);
+ if (ibreq == NULL)
{
NIS_RES_STATUS (res) = NIS_BADNAME;
return res;
@@ -611,10 +616,11 @@ nis_modify_entry (const_nis_name name, const nis_object *obj2,
}
ibreq->ibr_obj.ibr_obj_len = 1;
- if ((status = __do_niscall (ibreq->ibr_name, NIS_IBMODIFY,
- (xdrproc_t) _xdr_ib_request,
- (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
- (caddr_t) res, 0, NULL)) != NIS_SUCCESS)
+ status = __do_niscall (ibreq->ibr_name, NIS_IBMODIFY,
+ (xdrproc_t) _xdr_ib_request,
+ (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
+ (caddr_t) res, 0, NULL);
+ if (__builtin_expect (status != NIS_SUCCESS, 0))
NIS_RES_STATUS (res) = status;
nis_free_request (ibreq);
@@ -640,7 +646,8 @@ nis_remove_entry (const_nis_name name, const nis_object *obj,
return res;
}
- if ((ibreq =__create_ib_request (name, flags)) == NULL)
+ ibreq = create_ib_request (name, flags);
+ if (ibreq == NULL)
{
NIS_RES_STATUS (res) = NIS_BADNAME;
return res;
@@ -686,7 +693,7 @@ nis_first_entry (const_nis_name name)
return res;
}
- ibreq = __create_ib_request (name, 0);
+ ibreq = create_ib_request (name, 0);
if (ibreq == NULL)
{
NIS_RES_STATUS (res) = NIS_BADNAME;
@@ -698,7 +705,7 @@ nis_first_entry (const_nis_name name)
(caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
(caddr_t) res, 0, NULL);
- if (status != NIS_SUCCESS)
+ if (__builtin_expect (status != NIS_SUCCESS, 0))
NIS_RES_STATUS (res) = status;
nis_free_request (ibreq);
@@ -723,7 +730,7 @@ nis_next_entry (const_nis_name name, const netobj *cookie)
return res;
}
- ibreq = __create_ib_request (name, 0);
+ ibreq = create_ib_request (name, 0);
if (ibreq == NULL)
{
NIS_RES_STATUS (res) = NIS_BADNAME;
@@ -741,7 +748,7 @@ nis_next_entry (const_nis_name name, const netobj *cookie)
(caddr_t) ibreq, (xdrproc_t) _xdr_nis_result,
(caddr_t) res, 0, NULL);
- if (status != NIS_SUCCESS)
+ if (__builtin_expect (status != NIS_SUCCESS, 0))
NIS_RES_STATUS (res) = status;
if (cookie != NULL)
diff --git a/stdio-common/tst-printf.sh b/stdio-common/tst-printf.sh
index 04d04b20b8..f3091d2f96 100644
--- a/stdio-common/tst-printf.sh
+++ b/stdio-common/tst-printf.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Testing of printf.
-# Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
@@ -136,6 +136,12 @@ Test ok.
sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
printf ("%hhu", 257) = 1
printf ("%hu", 65537) = 1
+printf ("%hhi", 257) = 1
+printf ("%hi", 65537) = 1
+printf ("%1$hhu", 257) = 1
+printf ("%1$hu", 65537) = 1
+printf ("%1$hhi", 257) = 1
+printf ("%1$hi", 65537) = 1
--- Should be no further output. ---
EOF
cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||