Hello Alexey Serbin, Kudu Jenkins, Andrew Wong,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14585
to look at the new patch set (#2).
Change subject: gutil/strings: fix UB in FindNth
......................................................................
gutil/strings: fix UB in FindNth
It's not OK to overflow an unsigned type (size_t) in this way. Newer
versions of the code (in other Google codebases) address the problem by
using an int instead of size_t, so we'll do the same thing too.
src/kudu/gutil/strings/util.cc:1030:34: runtime error: unsigned integer
overflow: 18446744073709551615 + 1 cannot be represented in type 'unsigned long'
#0 0x7fcee8a0798e in FindNth(StringPiece, char, int)
/src/kudu/gutil/strings/util.cc:1030:34
Change-Id: I00a36f999a8c3b13469600b785da95c487643d4a
---
M src/kudu/gutil/strings/string_util-test.cc
M src/kudu/gutil/strings/util.cc
2 files changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/85/14585/2
--
To view, visit http://gerrit.cloudera.org:8080/14585
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I00a36f999a8c3b13469600b785da95c487643d4a
Gerrit-Change-Number: 14585
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)