hoyt@polyslo.CalPoly.EDU (Sir Hoyt) (09/20/88)
We too were having problems keeping named 4.8 running on our Pyramid 98x. I tracked the problem down to this line in ns_resp.c : cp = newmsg + sizeof(HEADER) + (cname ? dn_skipname(cp, newmsg + newmsglen) : n) + QFIXEDSZ; It seems that the Pyramid's C compiler was producing bad code. After the adds in the line cp would be equal to 0x112, which is not correct when newmsg = <some valid address> (greater then 0x112 :-), n = 14, cname = 0, and both sizeof(HEADER) and QFIXEDSZ are positive. The following changes to ns_resp.c 'fixed' the problem of named dying: 466 if (cname) 467 cp += dn_skipname(cp, newmsg + newmsglen) + QFIXEDSZ; 468 if ((n = dn_expand(newmsg, newmsg + newmsglen, 469 cp, dname, sizeof(name))) < 0) { 470 #ifdef DEBUG 471 if (debug) 472 fprintf(ddt,"dn_expand failed\n" ); 473 #endif 474 goto servfail; 475 } 476 #ifdef pyr 477 cp = newmsg + sizeof(HEADER); 478 cp = cp + (cname ? dn_skipname(cp, newmsg + newmsglen) : n); 479 cp = cp + QFIXEDSZ; 480 #else 481 cp = newmsg + sizeof(HEADER) + 482 (cname ? dn_skipname(cp, newmsg + newmsglen) : n) + QFIXEDSZ; 483 #endif pyr 484 485 buflen = sizeof(newmsg) - (cp - newmsg); 486 487 try_again: -- John H. Pochmara A career is great, UUCP: {csun,voder,trwind}!polyslo!hoyt But you can't run your Internet: hoyt@polyslo.CalPoly.EDU fingers through its hair -Graffiti 4/13/83