boostorg / boostorg/build

Potential memory leak in file_collect_archive_content_

オープン
#325 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
transition
主要言語
C++
スター
251
フォーク
63
PR マージ指標
30日以内にマージされた PR はありません

説明

https://github.com/boostorg/build/blob/0c6d016/src/engine/fileunix.c#L324 performs a memory allocation which has a chance of leaking when processing a corrupt archive.

In the unlikely situation where an archive has two string tables (or simply one string table and another entry with a name that starts with `//`) there will be a second allocation and the original value of `string_table` will be leaked.

This probably isn't worth fixing, I'm only reporting it because Coverity flags it as a leak. If you do want to make any change then it's probably enough to just do something like:

assert(!string_table);

before the allocation.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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