Skip to content

fix(tokio): reject DataRow with a field count that differs from the columns - #37

Merged
def- merged 2 commits into
masterfrom
datarow-field-count
Nov 12, 2026
Merged

def- merged 2 commits into
masterfrom
datarow-field-count

Conversation

@def-

@def- def- commented Nov 12, 2026

Copy link
Copy Markdown

Row/SimpleQueryRow validated the requested index against the RowDescription column count but indexed the ranges vector built from the DataRow field count, which the server controls independently. A DataRow with fewer fields than advertised columns made get/try_get (and a plain 0..row.len() loop) panic with an out-of-bounds index. Validate the two counts match when the row is built so the mismatch surfaces as a recoverable error instead.

Cherry-picked from upstream's 7a00ffa

…olumns

Row/SimpleQueryRow validated the requested index against the RowDescription
column count but indexed the ranges vector built from the DataRow field count,
which the server controls independently. A DataRow with fewer fields than
advertised columns made get/try_get (and a plain 0..row.len() loop) panic with
an out-of-bounds index. Validate the two counts match when the row is built so
the mismatch surfaces as a recoverable error instead.
@def-
def- requested a review from jasonhernandez November 12, 2026 05:29
With `use std::f32;` in scope, `f32::INFINITY` resolves to the deprecated
module constant. Rust 1.99 warns on it, and CI's -Dwarnings turns that
into a compile error in the clippy and test jobs. Upstream removed the
same imports.
@def-
def- merged commit 0a2c9f9 into master Nov 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants