Bug 52 - ntalkd can't handle long (>32 character) hostnames
Summary: ntalkd can't handle long (>32 character) hostnames
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: FreeBSD Core Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1994-12-14 14:20 UTC by Craig 'Bursting With Fruit Flavor' Struble
Modified: 1994-12-14 14:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig 'Bursting With Fruit Flavor' Struble 1994-12-14 14:20:01 UTC
	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.

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];
How-To-Repeat: 
	Be on a host with a hostname longer than 32 bytes and receive a talk
	request.
Comment 1 Andrey A. Chernov freebsd_committer freebsd_triage 1994-12-15 01:21:21 UTC
State Changed
From-To: open->closed