Bug in String::copy, out of bounds crash
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- embedded-iot
調査の方向性
cores/esp8266/WString.cpp の 280-291 行付近から始め、setLen および reserve と合わせて String::copy を調べてください。割り当て境界を引き起こす文字列長でクラッシュを再現し、終端 null 文字が常に割り当てられた配列内にあり、範囲外アクセスが発生しないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Problem Description
See line 291 (and line 280):
When allocating an array of N elements, accessing element [N] is out of bounds.
This only happens sometimes at very specific string lengths, as setLen only allocates in multiples of N bytes.
N.B. similar issue for ESP32, so I will also add an issue there.
Suggested fix:
reserve(length + 1);
N.B. This function is likely to be called with strlen() or strlen_P() as argument, which does not include the ending null character.
- 主要言語
- C++
- スター
- 16.7k
- フォーク
- 13.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
esp8266/Arduino のほかの issue
-
Typo in Scan Class Documentation対応中かも @MukundaKatta が 179 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
lwip2 time-wait.patch: TCP_TW_LIMIT can abort the pcb that tcp_process() is still handling -> double free, heap corruption対応中かも @scardus が 13 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
esp8266/Arduino の issue をすべて見る
似ている issue
-
bug derived types format I/O medium priority semantics
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
CartLineConstraint Jacobian always writes 6 rows, overruns when indices has fewer than 6 entriesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tesseract-robotics/trajopt#618 ·
メンテナーはふだん 1 日以内に返信
-
Incorrect Link in README.md対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
flameshot-org/flameshot#4996 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
utopia-rise/godot-jvm#1004 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 3 日以内に返信