You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by ga...@apache.org on 2020/03/24 10:03:29 UTC
[orc] branch master updated: ORC-604: Check in
StringDictionary.getValueByIndex is too permissive
This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/master by this push:
new 06bc0a4 ORC-604: Check in StringDictionary.getValueByIndex is too permissive
06bc0a4 is described below
commit 06bc0a402d736a36639039459fe5d6f7c5510546
Author: Norbert Luksa <no...@cloudera.com>
AuthorDate: Tue Mar 24 11:03:22 2020 +0100
ORC-604: Check in StringDictionary.getValueByIndex is too permissive
This fixes #487
---
c++/include/orc/Vector.hh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c++/include/orc/Vector.hh b/c++/include/orc/Vector.hh
index 6213769..752e1af 100644
--- a/c++/include/orc/Vector.hh
+++ b/c++/include/orc/Vector.hh
@@ -134,7 +134,7 @@ namespace orc {
DataBuffer<int64_t> dictionaryOffset;
void getValueByIndex(int64_t index, char*& valPtr, int64_t& length) {
- if (index < 0 || static_cast<uint64_t>(index) >= dictionaryOffset.size()) {
+ if (index < 0 || static_cast<uint64_t>(index) + 1 >= dictionaryOffset.size()) {
throw std::out_of_range("index out of range.");
}