Commit d23378d
committed
[C++] Fix null pointer dereference in SimpleTable constructor
The SimpleTable constructors dereference columns_[0] and columns[0]
without checking for null when num_rows < 0. This causes a segfault
if a user passes a vector containing null pointers, as the null check
in ValidateMeta() runs after construction.
Fixed by adding null checks before dereferencing the first column.1 parent 222fac7 commit d23378d
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
0 commit comments