1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2026-03-17 18:03:26 +00:00
Commit Graph

1570 Commits

Author SHA1 Message Date
cbb466e813 added another version case to Makefile.msvc
nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110
2015-11-11 09:56:06 +00:00
ce3a0ee056 Merge pull request #26 from bitbouncer/vs-2013
added define for visual studio 2013
2015-09-16 10:51:30 +01:00
cac35ac5d8 added define for visual studio 2013 2015-06-25 10:32:03 +02:00
bba4dc573f ares__read_line: free buf on realloc failure 2014-11-06 10:21:54 +01:00
453578354f Destroy options if ares_save_options fails
It's possible that, if ares_save_options failed, the opts structure
would contain some allocated memory. Calling ares_destroy_options in
this case is safe, because ares_save_options zeroes out the memory
initially.
2014-11-06 10:21:54 +01:00
a0b24beb95 Continue loop if space for hostname not large enough
When attempting to build a search domain from the local hostname
(used as a fallback when no other methods have given a search
domain), the code doubles the buffer size on each loop iteration.

However, the loop previously had a WHILE_FALSE terminator so the continue
statement exited the loop rather than going round again.
2014-11-06 10:14:08 +01:00
3d3ab03c6d ares_getnameinfo.3: there is no ares_getaddrinfo 2014-10-30 11:05:34 +01:00
9456c39934 Prevent tmpbuf from overrunning
Fix Coverity error CID 56886.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:56 +01:00
296ced3a0d Re-start loop if select fails
Fix Coverity error CID 56882

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:55 +01:00
bd2c61353f Free temporary variable in error path
Fix Coverity CID 56890

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:51 +01:00
7db1afd38f Fix integer shift overflow if both tcp_socket and udp_socket are set
The problem occurs if at the start of the loop the sockindex is at the
last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
tcp_socket are valid, sockindex gets incremented for UDP first and
points one entry behind the array for the tcp block.
So the fix is to check after every increment of sockindex if it is still
valid.

Fix Coverity error CID 56878

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:49 +01:00
13dc4800b2 Null check before dereference
Fix Coverity error CID 56880

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:46 +01:00
880ec44da9 Comment in ares_ipv6.h 2014-07-28 20:27:51 +02:00
ede0f84b8e CONTRIBUTING: add file to indicate mailing list is preferred 2014-07-25 09:28:46 +01:00
2bc07b2e74 Add -t u option to ahost
Add an option to allow specification of the AF_UNSPEC
address family.
2014-07-24 16:39:13 +01:00
c1fe47f6d9 host_callback: Fall back to AF_INET on searching with AF_UNSPEC
Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
first AF_INET6 call only returned CNAMEs, the host_callback never
retried AF_INET.

This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
taken as authoritative only if the result contains some addresses.
2014-07-24 16:12:39 +02:00
943e79f4bf Move memset call below platform-specific declarations
A GitHub commenter [1] says that my recent change to ahost.c has
problems compiling on Windows + C89 platforms.

[1]  https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616
2014-07-23 18:03:45 +02:00
7aabbefab1 Update ahost man page to describe -s option.
Commit ee22246507 added the -s <domain> option to the
ahost command, but neglected to update the man page to
describe it.

Also fix typo in description of -t option.
2014-07-01 10:47:56 +02:00
09e64d7124 ares_parse_soa_reply: Do not leak rr_name on allocation failure
If ares_malloc_data failed, already allocated rr_name would go out of
scope.
2014-05-22 16:35:58 +02:00
7df69c0f79 Don't override explicitly specified search domains
Only set search domains from /etc/resolv.conf if there isn't a value
already present in the channel.
2014-05-22 16:24:24 +02:00
ee22246507 Allow specification of search domain in ahost
Add the "-s domain" command line option to override the search
domains.
2014-05-22 16:21:56 +02:00
0004f498dc Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"
This reverts commit 440110b303.
2014-05-12 20:00:36 +02:00
440110b303 ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address 2014-05-07 13:47:22 +02:00
bc529dd0c2 ares_build.h: fix building on 64-bit powerpc
There are two issues.

1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
__PPC64__.  The tests of __ILP32__ and __LP64__ are sufficient for gcc.

2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
targeting ppc64.  This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
when building with clang.

My patch is two change the order of the checks so that we check the
64-bit case first.
2014-02-16 22:54:45 +01:00
d5d3871335 refresh: updated now with automake 1.14 2013-11-15 23:52:39 +01:00
4aa1fc4163 single_domain: Invalid memory access for empty string input
We noticed a small buglet in ares_search() when it gets an empty string
as input -- the single_domain() utility function in ares_search.c
accesses invalid memory (before the start of the string).
2013-11-12 17:40:42 -08:00
c8ec633bf5 Fixed warning 'type specifier missing'. 2013-08-31 22:40:22 +02:00
83ab208e83 ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it
It was removed in f19387dd72
2013-08-30 23:03:07 +02:00
f19387dd72 nowarn: use <limits.h> instead of configure for size of long
This makes the header file much more multi-arch friendly and can be used
as-is with both 32 bit and 64 bit builds.
2013-08-27 13:36:41 +02:00
efdd616118 timeoffset: made static and private
ares__timeoffset() was only used once within this single source file
2013-08-27 13:06:57 +02:00
30c9031afa timeadd: make static
ares__timeadd() was only ever used from within the same source
2013-08-27 13:02:35 +02:00
742e234855 xc-am-iface.m4: comments refinement 2013-07-18 16:03:21 +02:00
68b3c67e61 configure: fix 'subdir-objects' distclean related issue
See XC_AMEND_DISTCLEAN comments for details.
2013-07-18 04:20:31 +02:00
d69ae9c6f8 configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE) 2013-07-09 00:10:38 +02:00
9540d48184 xc-am-iface.m4: provide XC_AUTOMAKE macro 2013-07-09 00:07:27 +02:00
f8a2354016 gitignore: ignore all ares_*pdf but also CHANGES.dist 2013-05-12 16:10:47 +02:00
1c948a70b1 bump: start working towards 1.10.1 2013-05-12 16:09:32 +02:00
46fa9cad79 RELEASE-NOTES: two more bug fixes cares-1_10_0 2013-05-12 15:35:42 +02:00
09be3edf3a ares_set_servers_csv: fixed IPv6 address parsing
Fixed bug that caused the last part of an IPv6 address to be parsed as
the port number when the last part is all numeric.
2013-05-12 15:23:43 +02:00
03e2fd085c nroff: fix two syntax mistakes
ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of
\fP

Reported-by: Alexander Klauer
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml
2013-05-02 23:11:13 +02:00
df55bfac79 build: fix build on msvc11 2013-05-02 22:46:48 +02:00
3f0ec4733e Makefile.am: increment -version-info for 1.10.0 release 2013-04-23 16:44:56 +02:00
76ef032fd0 README: remove unnecessary comment 2013-04-23 00:33:24 +02:00
58a822231c ares_version.h: copyright end range year is now 2013 2013-04-23 00:32:51 +02:00
c727dcb924 RELEASE-NOTES: synced with fb0737f3a0 2013-04-23 00:31:14 +02:00
fb0737f3a0 ares_parse_aaaa_reply: Plug memory leak
This change is similar to ares_parse_a_reply.c in commit
bffd67f16a
2013-04-22 23:54:40 +02:00
b5135bbc66 ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
Previously, the function would wrongly return all substrings merged into
one.
2013-04-22 23:32:02 +02:00
9a92b80191 library init: documentation update
This commit updates the documentation of ares_library_init() and
ares_library_cleanup() with regard to the newly introduced reference
counting of initializations and deinitializations.
2013-04-22 23:26:01 +02:00
2e0c3076e5 library init: be recursive
Previously, a single call to ares_library_cleanup() would deinitialise
the c-ares library, regardless of how many times ares_library_init() was
called. This behaviour may cause problems in programs linking two or
more libraries which, in turn, use c-ares. The present commit fixes this
problem, deinitializing the library only after a number of calls to
ares_library_cleanup() matching the number of calls to
ares_library_init().
2013-04-22 23:24:50 +02:00
148c8e0353 protocol parsing: check input data stricter
... so that bad length fields aren't blindly accepted

Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml
2013-04-15 22:28:01 +02:00