summaryrefslogtreecommitdiff
path: root/nis/nss_nisplus/nisplus-netgrp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-19 12:11:38 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-19 12:11:38 +0000
commit2c6cfe6853a30deb4af842aacc924fa298d0521a (patch)
tree7fcc409e499bb8e3d96522f7fc2393fc10e53db2 /nis/nss_nisplus/nisplus-netgrp.c
parent3ccb96cd41b38d0159bdf8aad229c3599864c65d (diff)
Updated to fedora-glibc-20051219T1003cvs/fedora-glibc-2_3_90-19
Diffstat (limited to 'nis/nss_nisplus/nisplus-netgrp.c')
-rw-r--r--nis/nss_nisplus/nisplus-netgrp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c
index 344d65f4c4..31a8cdf097 100644
--- a/nis/nss_nisplus/nisplus-netgrp.c
+++ b/nis/nss_nisplus/nisplus-netgrp.c
@@ -150,15 +150,14 @@ internal_endnetgrent (struct __netgrent *netgrp)
enum nss_status
_nss_nisplus_setnetgrent (const char *group, struct __netgrent *netgrp)
{
- enum nss_status status;
- char buf[strlen (group) + 30];
+ char buf[strlen (group) + 25];
if (group == NULL || group[0] == '\0')
return NSS_STATUS_UNAVAIL;
- status = NSS_STATUS_SUCCESS;
+ enum nss_status status = NSS_STATUS_SUCCESS;
- sprintf (buf, "[name=%s],netgroup.org_dir", group);
+ snprintf (buf, sizeof (buf), "[name=%s],netgroup.org_dir", group);
netgrp->data = (char *) nis_list (buf, EXPAND_NAME, NULL, NULL);