diff options
author | teor <teor@torproject.org> | 2019-10-23 08:46:57 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-23 08:46:57 +1000 |
commit | 62194caa0565881178a784fe7662e5c9aa6c5b56 (patch) | |
tree | 452317ce894df1c1f9923bcf92fe304223b58dc8 | |
parent | 14ba43f92edf54343c7358d7c32f5f0993c9a5ae (diff) | |
parent | 8682442c7629c2ede5198a00ab1cf8f4e21991d6 (diff) | |
download | tor-62194caa0565881178a784fe7662e5c9aa6c5b56.tar.gz tor-62194caa0565881178a784fe7662e5c9aa6c5b56.zip |
Merge branch 'maint-0.2.9' into release-0.2.9
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | changes/ticket31001 | 6 | ||||
-rw-r--r-- | changes/ticket31372_travis | 4 | ||||
-rw-r--r-- | src/common/compat.c | 8 |
4 files changed, 18 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 7c7fcf4f6d..d429e15371 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,10 @@ os: ## Instead, we list each job under matrix: include: env: global: - ## The Travis CI environment allows us two cores, so let's use both. - - MAKEFLAGS="-j 2" + ## The Travis CI environment allows us two cores, so let's use both. Also, + ## let's use the "-k" flag so that we get all of the compilation failures, + ## not just the first one. + - MAKEFLAGS="-k -j 2" ## We turn on hardening by default ## Also known as --enable-fragile-hardening in 0.3.0.3-alpha and later - HARDENING_OPTIONS="--enable-expensive-hardening" diff --git a/changes/ticket31001 b/changes/ticket31001 new file mode 100644 index 0000000000..2ce1cbdf34 --- /dev/null +++ b/changes/ticket31001 @@ -0,0 +1,6 @@ + o Minor bugfixes (compatibility, standards compliance): + - Fix a bug that would invoke undefined behavior on certain operating + systems when trying to asprintf() a string exactly INT_MAX bytes + long. We don't believe this is exploitable, but it's better + to fix it anyway. Fixes bug 31001; bugfix on 0.2.2.11-alpha. + Found and fixed by Tobias Stoeckmann. diff --git a/changes/ticket31372_travis b/changes/ticket31372_travis new file mode 100644 index 0000000000..403869b2ed --- /dev/null +++ b/changes/ticket31372_travis @@ -0,0 +1,4 @@ + o Minor features (continuous integration): + - When building on Travis, pass the "-k" flag to make, so that + we are informed of all compilation failures, not just the first + one or two. Closes part of ticket 31372. diff --git a/src/common/compat.c b/src/common/compat.c index e99abcb16d..4d4a81e1c1 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -542,8 +542,8 @@ tor_vasprintf(char **strp, const char *fmt, va_list args) *strp = NULL; return -1; } - strp_tmp = tor_malloc(len + 1); - r = _vsnprintf(strp_tmp, len+1, fmt, args); + strp_tmp = tor_malloc((size_t)len + 1); + r = _vsnprintf(strp_tmp, (size_t)len+1, fmt, args); if (r != len) { tor_free(strp_tmp); *strp = NULL; @@ -578,9 +578,9 @@ tor_vasprintf(char **strp, const char *fmt, va_list args) *strp = tor_strdup(buf); return len; } - strp_tmp = tor_malloc(len+1); + strp_tmp = tor_malloc((size_t)len+1); /* use of tor_vsnprintf() will ensure string is null terminated */ - r = tor_vsnprintf(strp_tmp, len+1, fmt, args); + r = tor_vsnprintf(strp_tmp, (size_t)len+1, fmt, args); if (r != len) { tor_free(strp_tmp); *strp = NULL; |