diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc index 8cf41ce4dd..758fe5cdf6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc @@ -120,7 +120,7 @@ Status FileHandleImpl::Seek(off_t *offset, std::ios_base::seekdir whence) { bool FileHandleImpl::CheckSeekBounds(ssize_t desired_position) { ssize_t file_length = file_info_->file_length_; - if (desired_position < 0 || desired_position >= file_length) { + if (desired_position < 0 || desired_position > file_length) { return false; }