Skip to content

Commit c9ffccd

Browse files
Fix NULL derefencing in columnar_result_set_row (#9762)
Fix Coverity report issue: >>> CID 503639: (FORWARD_NULL) >>> Passing "&columnar_result" to "columnar_result_set_row", which dereferences null "columnar_result.offset_buffer". 577 columnar_result_set_row(&columnar_result, batch_state, row, result, isnull); Disable-check: force-changelog-file (cherry picked from commit d4c12e2)
1 parent d474509 commit c9ffccd

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
@@ -194,6 +194,8 @@ columnar_result_set_row(ColumnarResult *columnar_result, DecompressBatchState co
194194
memcpy(&columnar_result->body_buffer[columnar_result->current_offset],
195195
VARDATA_ANY(datum),
196196
result_bytes);
197+
/* offset_buffer should be allocated for ArrowText type */
198+
Assert(columnar_result->offset_buffer != NULL);
197199
columnar_result->offset_buffer[row] = columnar_result->current_offset;
198200
columnar_result->current_offset += result_bytes;
199201
break;

0 commit comments

Comments
 (0)