You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2014/07/15 01:01:52 UTC
[05/10] git commit: TS-1475: Coverity 1215253 Out-of-bounds write
TS-1475: Coverity 1215253 Out-of-bounds write
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d6c6883a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d6c6883a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d6c6883a
Branch: refs/heads/master
Commit: d6c6883ab587393ed54c1692456bd35acfa8d00a
Parents: 93b773d
Author: Justin Laue <ju...@fp-x.com>
Authored: Mon Jul 14 15:20:53 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 17:01:40 2014 -0600
----------------------------------------------------------------------
lib/ts/ink_res_init.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d6c6883a/lib/ts/ink_res_init.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_res_init.cc b/lib/ts/ink_res_init.cc
index dee9acc..638e889 100644
--- a/lib/ts/ink_res_init.cc
+++ b/lib/ts/ink_res_init.cc
@@ -621,8 +621,8 @@ parse_host_res_preference(char const* value, HostResPreferenceOrder order) {
order[np++] = HOST_RES_PREFER_IPV4;
if (!found[HOST_RES_PREFER_IPV6])
order[np++] = HOST_RES_PREFER_IPV6;
- if (np < N_HOST_RES_PREFERENCE)
- order[np++] = HOST_RES_PREFER_NONE;
+ if (np < N_HOST_RES_PREFERENCE_ORDER) // was N_HOST_RES_PREFERENCE)
+ order[np] = HOST_RES_PREFER_NONE;
}
}