Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

find_null_exn probes past the iobuf when a terminator is missing

オープン
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
ocaml, postgres
領域
backend, databases

調査の方向性

Protocol.Shared.find_null_exn から始め、境界の処理を Iobuf.Peek.index と比較します。issue で言及されている inline のリグレッションを確認し、空のバッファーと終端子のないバッファーを対象にします。不正な C strings が偶発的な境界例外ではなく、明示的な終端子欠落エラーに到達すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

forwarded-to-js-devs

Protocol.Shared.find_null_exn checks Iobuf.Peek.char iobuf ~pos before checking whether pos is still inside the buffer. For an empty iobuf it peeks out of bounds immediately. For a non-empty iobuf without a null byte, it advances to pos = length and then peeks out of bounds before reaching its intended failwith branch.

This is reachable while parsing malformed backend messages containing C strings. The parser does reject the frame, but through an accidental bounds exception rather than the explicit missing-terminator error.

Iobuf.Peek.index already provides the bounded search needed here. I have a small patch ready that uses it and adds an inline regression for a missing terminator.

主要言語
OCaml
スター
28
フォーク
7
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。