summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-30 16:21:56 +0000
committerYang Tse <yangsita@gmail.com>2009-10-30 16:21:56 +0000
commitcef06973a24cc728d2903a63034f5524a95d6ba3 (patch)
treea9873e37bb5cb7fd2ee4f8a381edf95ab61fe4a0 /ares.h
parentde48a86cf62bc67edafc5ebf37484cb68f14dd55 (diff)
downloadc-ares-cef06973a24cc728d2903a63034f5524a95d6ba3.tar.gz
c-ares-cef06973a24cc728d2903a63034f5524a95d6ba3.tar.bz2
c-ares-cef06973a24cc728d2903a63034f5524a95d6ba3.zip
In no particular order, changed/fixed all of the following in
ares_parse_txt_reply() current version: - Fixed a couple of potential double free's. - Fixed memory leaks upon out of memory condition. - Fixed pointer arithmetic. - Setting ntxtreply to zero upon entry for all failure cases. - Changed data type to size_t for variables substr_len, str_len and the length member of ares_txt_reply struct. - Avoided a couple of memcpy() calls. - Changed i data type to unsigned int to prevent compiler warnings. - Adjusted a comment. - Use ARES_SUCCESS literal for successfull completion. - Added CVS Id tag.
Diffstat (limited to 'ares.h')
-rw-r--r--ares.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ares.h b/ares.h
index 35038d2..593a145 100644
--- a/ares.h
+++ b/ares.h
@@ -437,7 +437,7 @@ struct ares_srv_reply {
};
struct ares_txt_reply {
- unsigned int length;
+ size_t length; /* length excludes null termination */
unsigned char *txt;
};