From 0d66e3739146c9349ceb7600adc814d7d968e14c Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 22 Jun 2003 13:58:15 +0000 Subject: [PATCH] + * Fix bogus multiple updates to p in transmit.c (!) @@ -4,9 +4,12 @@ + * Fix bogus multiple updates to p in transmit.c (!) + * Fix up spurious #undef's in hredirect.h. (and there doesn't seem to be much explanation why). + * #include in internal.h (for abort etc). --- changelog | 3 +++ regress/hredirect.h | 12 ++++++------ regress/hredirect.h.m4 | 2 +- src/internal.h | 1 + src/transmit.c | 4 +++- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/changelog b/changelog index e14fec3..93665f3 100644 --- a/changelog +++ b/changelog @@ -4,9 +4,12 @@ adns (1.1); urgency=medium * Do not spin if connect() fails immediately (!) * Stop searching on a CNAME (even if it's broken). * When search list runs out, _qf_owner sets owner to query domain. + * Fix bogus multiple updates to p in transmit.c (!) + * Fix up spurious #undef's in hredirect.h. * Don't use any more, it was a mistake made in pre-1.0 (and there doesn't seem to be much explanation why). * Understand and sort of check OpenBSD `lookup' resolv.conf directive. + * #include in internal.h (for abort etc). * Always #include before (for FreeBSD 4.6). * Added wishlist entry re configurable port no. * Problem with SERVFAIL in TODO. diff --git a/regress/hredirect.h b/regress/hredirect.h index d49da69..7550687 100644 --- a/regress/hredirect.h +++ b/regress/hredirect.h @@ -23,16 +23,16 @@ #define read Hread #undef write #define write Hwrite -#undef int +#undef writev #define writev Hwritev -#undef int +#undef gettimeofday #define gettimeofday Hgettimeofday -#undef void* +#undef malloc #define malloc Hmalloc -#undef void +#undef free #define free Hfree -#undef void* +#undef realloc #define realloc Hrealloc -#undef void +#undef exit #define exit Hexit #endif diff --git a/regress/hredirect.h.m4 b/regress/hredirect.h.m4 index 49a36c3..e192d62 100644 --- a/regress/hredirect.h.m4 +++ b/regress/hredirect.h.m4 @@ -33,7 +33,7 @@ m4_include(hmacros.i4) hm_create_nothing m4_define(`hm_syscall', `#undef $1 #define $1 H$1') -m4_define(`hm_specsyscall',`#undef $1 +m4_define(`hm_specsyscall',`#undef $2 #define $2 H$2') m4_include(`hsyscalls.i4') diff --git a/src/internal.h b/src/internal.h index 95fb6df..f8d443d 100644 --- a/src/internal.h +++ b/src/internal.h @@ -39,6 +39,7 @@ typedef unsigned char byte; #include #include #include +#include #include diff --git a/src/transmit.c b/src/transmit.c index 3b14822..b0a0cdd 100644 --- a/src/transmit.c +++ b/src/transmit.c @@ -96,7 +96,9 @@ adns_status adns__mkquery(adns_state ads, vbuf *vb, int *id_r, if (!(flags & adns_qf_quoteok_query)) return adns_s_querydomaininvalid; if (ctype_digit(p[0])) { if (ctype_digit(p[1]) && ctype_digit(p[2])) { - c= (*p++ - '0')*100 + (*p++ - '0')*10 + (*p++ - '0'); + c= (*p++ - '0')*100; + c += (*p++ - '0')*10; + c += (*p++ - '0'); if (c >= 256) return adns_s_querydomaininvalid; } else { return adns_s_querydomaininvalid; -- 2.30.2