diff --git a/doc/example.conf b/doc/example.conf index e2f9c677..4c40484f 100755 --- a/doc/example.conf +++ b/doc/example.conf @@ -118,7 +118,7 @@ serverinfo { ssld_count = 1; /* tls_min_ver: minimum version of ssl/tls we support. Options are as follows - * "ssl3", "tls1.0", "tls1.1" and "tls1.2". SSLv3 is broken and shouldn't be used. + * "ssl3", "tls1.0", "tls1.1", "tls1.2" and "tls1.3". SSLv3 is broken and shouldn't be used. * Also some versions of OpenSSL may have SSLv3 disabled entirely, in such case * tls1 will be enforced regardless of this parameter. */ diff --git a/libratbox/include/rb_tools.h b/libratbox/include/rb_tools.h index eb635ef4..691950a3 100644 --- a/libratbox/include/rb_tools.h +++ b/libratbox/include/rb_tools.h @@ -43,7 +43,7 @@ rb_strlcat(char *dest, const char *src, size_t count) size_t len = strlen(src); size_t res = dsize + len; - assert(dsize >= count); + assert(dsize < count); dest += dsize; count -= dsize; diff --git a/libratbox/src/linebuf.c b/libratbox/src/linebuf.c index 32d09a60..c5472dfc 100644 --- a/libratbox/src/linebuf.c +++ b/libratbox/src/linebuf.c @@ -446,6 +446,8 @@ rb_linebuf_get(rb_buf_head_t * bufhead, char *buf, size_t buflen, bool partial, size_t cpylen; char *start, *ch; + lrb_assert(buflen > 0); + /* make sure we have a line */ if(bufhead->list.head == NULL) return 0; /* Obviously not.. hrm. */ @@ -897,4 +899,3 @@ unsigned int rb_linebuf_numlines(rb_buf_head_t *bufhead) { return bufhead->numlines; } - diff --git a/src/dns.c b/src/dns.c index d913fb8b..ca2945f2 100644 --- a/src/dns.c +++ b/src/dns.c @@ -287,7 +287,7 @@ parse_nameservers(char **parv, int parc) rb_dlinkDestroy(ptr, &nameservers); } - for(i = 2; i < parc; i++) + for(i = 1; i < parc; i++) { server = rb_strdup(parv[i]); rb_dlinkAddTailAlloc(server, &nameservers); @@ -408,4 +408,3 @@ rehash_resolver(void) { rb_helper_write(dns_helper, "R"); } -