[
https://issues.apache.org/jira/browse/ORC-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14714494#comment-14714494
]
ASF GitHub Bot commented on ORC-25:
-----------------------------------
Github user omalley commented on a diff in the pull request:
https://github.com/apache/orc/pull/7#discussion_r38004439
--- Diff: c++/src/MemoryPool.cc ---
@@ -88,7 +88,7 @@ namespace orc {
template <class T>
void DataBuffer<T>::reserve(uint64_t newCapacity){
- if (newCapacity > currentCapacity) {
+ if (newCapacity > currentCapacity || !buf) {
--- End diff --
No, coverity was complaining about needing null checks on buf in other
methods. With this change, even if newCapacity is 0, buf is always non-null.
> Clean up Coverity scans
> -----------------------
>
> Key: ORC-25
> URL: https://issues.apache.org/jira/browse/ORC-25
> Project: Orc
> Issue Type: Bug
> Reporter: Owen O'Malley
> Assignee: Owen O'Malley
> Attachments: orc-coverity.tiff
>
>
> I've scanned the ORC C++ code base and it identified some potential issues.
> Looking through them, so far they have all been harmless, but they should be
> cleaned up so that the analysis can come back clean.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)