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

No error thrown when there is garbage data past end-of-frame

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

メンテナーはふだん 2 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

末尾に余分なデータがある状態で zstandard.decompress と zstandard.compress を使用して例を再現し、その後、解凍のエントリーポイントをたどって、有効なフレームの後のバイトがどのように処理されるかを理解します。末尾のデータによってエラーが発生し、有効な圧縮フレームは引き続き正常に解凍されれば完了です。この動作を対象とするリグレッションテストを追加してください。

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

説明

bug enhancement

On 0.17.0, the following example doesn't throw an error:

>>> zstandard.decompress(zstandard.compress(b"foo") + b"garbage")
b'foo'

Perhaps debatable, but I think an error should always be thrown if there is data past the last valid frame in a stream. Especially after fixing https://github.com/indygreg/python-zstandard/issues/59, I don't think it makes sense to silently ignore the garbage past end-of-frame. Users should be notified if they are constructing invalid streams.

Thanks @thatch for identifying this issue.

主要言語
C
スター
641
フォーク
117
平均マージ
1日 14時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

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

indygreg/python-zstandard のほかの issue

indygreg/python-zstandard の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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