projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cccd9a5
)
In ares_mkquery, make sure we set buflen and buf to reasonable values if there's...
author
Steinar H. Gunderson
<sesse@google.com>
Sat, 29 Sep 2007 13:56:36 +0000
(13:56 +0000)
committer
Steinar H. Gunderson
<sesse@google.com>
Sat, 29 Sep 2007 13:56:36 +0000
(13:56 +0000)
ares_mkquery.c
patch
|
blob
|
history
diff --git
a/ares_mkquery.c
b/ares_mkquery.c
index
cfd15a9
..
9c84446
100644
(file)
--- a/
ares_mkquery.c
+++ b/
ares_mkquery.c
@@
-88,6
+88,10
@@
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
unsigned char *q;
const char *p;
+ /* Set our results early, in case we bail out early with an error. */
+ *buflen = 0;
+ *buf = NULL;
+
/* Compute the length of the encoded name so we can check buflen.
* Start counting at 1 for the zero-length label at the end. */
len = 1;