[345] in Hesiod
hesiod 3.0.2??
daemon@ATHENA.MIT.EDU (David E. Cross)
Mon Dec 30 03:34:42 1996
Date: Mon, 30 Dec 1996 03:32:47 -0500 (EST)
From: "David E. Cross" <dec@phoenix.its.rpi.edu>
To: hesiod@MIT.EDU
There has been a bug with the resolving of names with an @ sign in them
since 3.0.0... Here is a quick fix I made.
(sorry, too lazy to do a diff, but it is an easy (one line) fix)
file: hesiod.c
---<originial>----
char *hesiod_to_bind(void *context, const char *name, const char *type)
{
struct hesiod_p *ctx = (struct hesiod_p *) context;
char bindname[MAXDNAME], *p, *rhs, *ret;
char **rhs_list = NULL;
strcpy(bindname, name);
p = strchr(bindname, '@');
if (p)
{
*p++ = 0;
if (strchr(p, '.'))
rhs=p;
---<Patched>----
char *hesiod_to_bind(void *context, const char *name, const char *type)
{
struct hesiod_p *ctx = (struct hesiod_p *) context;
char bindname[MAXDNAME], *p, *rhs, *ret;
char **rhs_list = NULL;
strcpy(bindname, name);
p = strchr(bindname, '@');
if (p)
{
*p++ = 0;
if (strchr(p, '.'))
rhs=strchr(name, '@') + 1;
without this patch the code eventualy reaches a point where it does the
equalivalent of "strcat(p+4,p);" which over-writes the NULL terminator
and keeps on going. (just try "hesinfo -lb foo@bar srv")
--
David Cross
ACS Consultant
Rensselaer Polytechnic Institute