[4333] in Athena Bugs

home help back first fref pref prev next nref lref last post

potential problem in resolv library

daemon@ATHENA.MIT.EDU (John T Kohl)
Tue Feb 27 10:51:28 1990

Date: Tue, 27 Feb 90 10:51:06 EST
From: John T Kohl <root@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
I don't know the origin of the sources, but I found a return-value
dependency on sprintf() in a resolv library on the MIPS.

*** res_mkquery.c.~1~	Mon Mar 17 12:07:22 1986
--- res_mkquery.c	Tue Feb 27 10:42:31 1990
***************
*** 70,77 ****
  		if (!(_res.options & RES_INIT))
  			if (res_init() == -1)
  				return(-1);
! 		if (_res.defdname[0] != '\0')
! 			dname = sprintf(dnbuf, "%s.%s", dname, _res.defdname);
  	}
  	/*
  	 * perform opcode specific processing
--- 70,79 ----
  		if (!(_res.options & RES_INIT))
  			if (res_init() == -1)
  				return(-1);
! 		if (_res.defdname[0] != '\0') {
! 			(void) sprintf(dnbuf, "%s.%s", dname, _res.defdname);
! 			dname = dnbuf;
! 		}
  	}
  	/*
  	 * perform opcode specific processing

home help back first fref pref prev next nref lref last post