From cstruble@singularity.bevc.blacksburg.va.us  Wed Dec 14 14:11:42 1994
Received: from singularity.bevc.blacksburg.va.us (singularity.bevc.blacksburg.va.us [198.82.204.56]) by freefall.cdrom.com (8.6.8/8.6.6) with ESMTP id OAA09379 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 14 Dec 1994 14:11:40 -0800
Received: (from cstruble@localhost) by singularity.bevc.blacksburg.va.us (8.6.9/8.6.9) id RAA02343; Wed, 14 Dec 1994 17:11:40 -0500
Message-Id: <199412142211.RAA02343@singularity.bevc.blacksburg.va.us>
Date: Wed, 14 Dec 1994 17:11:40 -0500
From: "Craig 'Bursting With Fruit Flavor' Struble" <cstruble@singularity.bevc.blacksburg.va.us>
Reply-To: cstruble@singularity.bevc.blacksburg.va.us
To: FreeBSD-gnats-submit@freebsd.org
Subject: ntalkd can't handle long hostnames
X-Send-Pr-Version: 3.2

>Number:         52
>Category:       bin
>Synopsis:       ntalkd can't handle long (>32 character) hostnames
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    core (FreeBSD core team)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 14 14:20:01 1994
>Closed-Date:    Wed Dec 14 17:21:21 PST 1994
>Last-Modified:
>Originator:     Craig 'Bursting With Fruit Flavor' Struble
>Release:        FreeBSD 2.0-RELEASE i386
>Organization:
Just a black hole.
>Environment:

	FreeBSD 2.0 Release system, my hostname is
	singularity.bevc.blacksburg.va.us

>Description:

	ntalkd returns the following message upon getting a talk request:

	talkd[19219]: gethostname: Cannot allocate memory
    inetd[88]: /usr/libexec/ntalkd: exit status 0x100

	Upon looking at the source code for (n)talkd, there was only 32 bytes
	allocated for the hostname.

>How-To-Repeat:

	Be on a host with a hostname longer than 32 bytes and receive a talk
	request.

>Fix:
	
	In /usr/src/libexec/talkd/talkd.c:

	Add the following line to the include files:
		#include <sys/param.h>

	Change line 71 from:
		char hostname[32];

	to:
		char hostname[MAXHOSTNAMELEN];

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Wed Dec 14 17:21:21 PST 1994 
State-Changed-Why:  
Fixed. 
>Unformatted:



