mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-23 16:20:26 -05:00
- unbound-anchor review: BIO_write can return 0 successfully if it
has successfully appended a zero length string. git-svn-id: file:///svn/unbound/trunk@2884 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
2be3e34658
commit
ce0d35d6ae
2 changed files with 7 additions and 5 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
15 April 2013: Wouter
|
15 April 2013: Wouter
|
||||||
- Fix so that for a configuration line of include: "*.conf" it is not
|
- Fix so that for a configuration line of include: "*.conf" it is not
|
||||||
an error if there are no files matching the glob pattern.
|
an error if there are no files matching the glob pattern.
|
||||||
|
- unbound-anchor review: BIO_write can return 0 successfully if it
|
||||||
|
has successfully appended a zero length string.
|
||||||
|
|
||||||
11 April 2013: Wouter
|
11 April 2013: Wouter
|
||||||
- Fix queries leaking up for stubs and forwards, if the configured
|
- Fix queries leaking up for stubs and forwards, if the configured
|
||||||
|
|
|
||||||
|
|
@ -1231,7 +1231,7 @@ xml_charhandle(void *userData, const XML_Char *s, int len)
|
||||||
printf("'\n");
|
printf("'\n");
|
||||||
}
|
}
|
||||||
if(strcasecmp(data->tag, "Zone") == 0) {
|
if(strcasecmp(data->tag, "Zone") == 0) {
|
||||||
if(BIO_write(data->czone, s, len) <= 0) {
|
if(BIO_write(data->czone, s, len) < 0) {
|
||||||
if(verb) printf("out of memory in BIO_write\n");
|
if(verb) printf("out of memory in BIO_write\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
@ -1242,7 +1242,7 @@ xml_charhandle(void *userData, const XML_Char *s, int len)
|
||||||
return;
|
return;
|
||||||
b = xml_selectbio(data, data->tag);
|
b = xml_selectbio(data, data->tag);
|
||||||
if(b) {
|
if(b) {
|
||||||
if(BIO_write(b, s, len) <= 0) {
|
if(BIO_write(b, s, len) < 0) {
|
||||||
if(verb) printf("out of memory in BIO_write\n");
|
if(verb) printf("out of memory in BIO_write\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
@ -1435,7 +1435,7 @@ xml_startelem(void *userData, const XML_Char *name, const XML_Char **atts)
|
||||||
static void
|
static void
|
||||||
xml_append_str(BIO* b, const char* s)
|
xml_append_str(BIO* b, const char* s)
|
||||||
{
|
{
|
||||||
if(BIO_write(b, s, (int)strlen(s)) <= 0) {
|
if(BIO_write(b, s, (int)strlen(s)) < 0) {
|
||||||
if(verb) printf("out of memory in BIO_write\n");
|
if(verb) printf("out of memory in BIO_write\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
@ -1459,7 +1459,7 @@ xml_append_bio(BIO* b, BIO* a)
|
||||||
z[i] = ' ';
|
z[i] = ' ';
|
||||||
}
|
}
|
||||||
/* write to BIO */
|
/* write to BIO */
|
||||||
if(BIO_write(b, z, len) <= 0) {
|
if(BIO_write(b, z, len) < 0) {
|
||||||
if(verb) printf("out of memory in BIO_write\n");
|
if(verb) printf("out of memory in BIO_write\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
@ -1545,7 +1545,7 @@ xml_parse_setup(XML_Parser parser, struct xml_data* data, time_t now)
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "; created by unbound-anchor on %s",
|
snprintf(buf, sizeof(buf), "; created by unbound-anchor on %s",
|
||||||
ctime(&now));
|
ctime(&now));
|
||||||
if(BIO_write(data->ds, buf, (int)strlen(buf)) <= 0) {
|
if(BIO_write(data->ds, buf, (int)strlen(buf)) < 0) {
|
||||||
if(verb) printf("out of memory\n");
|
if(verb) printf("out of memory\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue