Repository: trafficserver Updated Branches: refs/heads/master fd71ba6a2 -> fa96b6e7b
TS-3221: ink_atoi64 return 0 in single digit case Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fa96b6e7 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fa96b6e7 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fa96b6e7 Branch: refs/heads/master Commit: fa96b6e7b9b243faf12c0d9e307f8a7675ccf211 Parents: fd71ba6 Author: Cynthia Gu <czhen...@linkedin.com> Authored: Mon Dec 8 13:43:10 2014 -0800 Committer: Brian Geffon <bri...@apache.org> Committed: Mon Dec 8 13:43:10 2014 -0800 ---------------------------------------------------------------------- lib/ts/ParseRules.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa96b6e7/lib/ts/ParseRules.cc ---------------------------------------------------------------------- diff --git a/lib/ts/ParseRules.cc b/lib/ts/ParseRules.cc index 1834bbd..3a53e98 100644 --- a/lib/ts/ParseRules.cc +++ b/lib/ts/ParseRules.cc @@ -268,7 +268,7 @@ ink_atoi64(const char *str, int len) len--; } - if (len <= 1) + if (len < 1) return 0; if (unlikely(str[0] == '0' && len > 1 && str[1] == 'x')) {