Skip to content

Commit f54a722

Browse files
Fix NULL derefencing in columnar_result_finalize (#9818)
Fix Coverity report issue: >>> CID 503639: (FORWARD_NULL) >>> Passing "&columnar_result" to "columnar_result_finalize", which dereferences null "columnar_result.offset_buffer". 594 return columnar_result_finalize(&columnar_result, batch_state);
1 parent 055f7e8 commit f54a722

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • tsl/src/nodes/vector_agg

tsl/src/nodes/vector_agg/exec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ columnar_result_finalize(ColumnarResult *columnar_result, DecompressBatchState c
237237
}
238238
else if (columnar_result->type == DT_ArrowText)
239239
{
240+
/* offset_buffer should be allocated for ArrowText type */
241+
Assert(columnar_result->offset_buffer != NULL);
240242
columnar_result->offset_buffer[nrows] = columnar_result->current_offset;
241243

242244
arrow_result = MemoryContextAllocZero(batch_state->per_batch_context,

0 commit comments

Comments
 (0)