Thomas Schoepf <schoepf@...> writes:
> I'm forwarding you three mails that contain more information (plus a patch)
> about the sparc classic problem. I hope this helps you.
[...]
> No, it doesn't, but I have traced down the obvious error and corrected
> them. See the diff file for details. Basically, these are the
> problems:
Somehow I missed one change, here it is.
Thomas <t.steffen@...>
PS: Keep in mind that I'm not on the list.
----------------------------------------------------------------------
--- dnrd-2.8/src/dns.c Thu Jun 15 17:20:59 2000
+++ dnrd-2.8-new/src/dns.c Sat Jan 6 00:02:50 2001
@@ -309,6 +310,7 @@
{
int k;
unsigned char *here;
+ unsigned short int conv;
if (ntohs(((short int *) msg)[2]) == 0) { /* C is nice. */
return (0);
@@ -320,12 +322,12 @@
k = get_objectname(msg, &here, y->name, 0);
y->name[k] = 0;
- memcpy(&y->type, here, sizeof(unsigned short int));
- y->type = ntohs(y->type);
+ memcpy(&conv, here, sizeof(unsigned short int)); /* ths latest */
+ y->type = ntohs(conv);
here += 2;
- memcpy(&y->class, here, sizeof(unsigned short int));
- y->class = ntohs(y->class);
+ memcpy(&conv, here, sizeof(unsigned short int));
+ y->class = ntohs(conv);
here += 2;
k = strlen(y->name);