diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-05-31 16:36:48 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-05-31 16:36:48 +0200 |
commit | 6a1190792b0409e7a996400614e5e2c6ba02e5f6 (patch) | |
tree | fa324d2f9f02668a6d56d2e4d195a59ab1d3710e /external/unbound/libunbound/libunbound.c | |
parent | fixed static assert test (diff) | |
download | monero-6a1190792b0409e7a996400614e5e2c6ba02e5f6.tar.xz |
update libunbound
Diffstat (limited to 'external/unbound/libunbound/libunbound.c')
-rw-r--r-- | external/unbound/libunbound/libunbound.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/external/unbound/libunbound/libunbound.c b/external/unbound/libunbound/libunbound.c index a37da9ee4..37288f256 100644 --- a/external/unbound/libunbound/libunbound.c +++ b/external/unbound/libunbound/libunbound.c @@ -1028,6 +1028,7 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) "\\hosts"); retval=ub_ctx_hosts(ctx, buf); } + free(name); return retval; } return UB_READFILE; @@ -1052,6 +1053,8 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) /* skip addr */ while(isxdigit((unsigned char)*parse) || *parse == '.' || *parse == ':') parse++; + if(*parse == '\r') + parse++; if(*parse == '\n' || *parse == 0) continue; if(*parse == '%') @@ -1065,7 +1068,8 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) *parse++ = 0; /* end delimiter for addr ... */ /* go to names and add them */ while(*parse) { - while(*parse == ' ' || *parse == '\t' || *parse=='\n') + while(*parse == ' ' || *parse == '\t' || *parse=='\n' + || *parse=='\r') parse++; if(*parse == 0 || *parse == '#') break; |