Bug 768 - nscd gives bad results for extremely long lines in /etc/hosts
Summary: nscd gives bad results for extremely long lines in /etc/hosts
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.4
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
Depends on:
Blocks: libc235
  Show dependency treegraph
 
Reported: 2005-02-26 01:16 IST by Roland McGrath
Modified: 2005-03-15 08:03 IST (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland McGrath 2005-02-26 01:16:28 IST
This trunk change is needed on the 2.3 branch.

2005-02-21  Jakub Jelinek  <jakub@redhat.com>

	* nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to
	NETDB_INTERNAL if buffer is too small.

	* nscd/hstcache.c (INCR): Remove.
	(addhstbyX): Double buflen in each iteration rather than add INCR.
	* nscd/grpcache.c: Likewise.
	* nscd/pwdcache.c: Likewise.
Comment 1 cvs-commit@gcc.gnu.org 2005-02-26 01:19:14 IST
Subject: Bug 768

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-26 01:19:05

Modified files:
	nscd           : nscd_gethst_r.c 

Log message:
	2005-02-21  Jakub Jelinek  <jakub@redhat.com>
	
	[BZ #768]
	* nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to
	NETDB_INTERNAL if buffer is too small.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nscd/nscd_gethst_r.c.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.30&r2=1.30.2.1

Comment 2 cvs-commit@gcc.gnu.org 2005-02-26 01:19:14 IST
Subject: Bug 768

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-26 01:19:02

Modified files:
	nscd           : grpcache.c pwdcache.c hstcache.c 

Log message:
	2005-02-21  Jakub Jelinek  <jakub@redhat.com>
	
	[BZ #768]
	* nscd/hstcache.c (INCR): Remove.
	(addhstbyX): Double buflen in each iteration rather than add INCR.
	* nscd/grpcache.c: Likewise.
	* nscd/pwdcache.c: Likewise.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nscd/grpcache.c.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.36&r2=1.36.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nscd/pwdcache.c.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.35&r2=1.35.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nscd/hstcache.c.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.31&r2=1.31.4.1

Comment 3 Jakub Jelinek 2005-03-15 08:03:15 IST
Fixed in CVS.