Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoryReader と MemoryViewReader のバグ #1264

Open
Raclamusi opened this issue Sep 25, 2024 · 0 comments
Open

MemoryReader と MemoryViewReader のバグ #1264

Raclamusi opened this issue Sep 25, 2024 · 0 comments

Comments

@Raclamusi
Copy link
Member

指定した位置から読み込まれない

lookahead() の実装で pos とすべき箇所が m_pos になっています。

std::memcpy(dst, (m_blob.data() + m_pos), static_cast<size_t>(readSize));

std::memcpy(dst, (m_ptr + m_pos), static_cast<size_t>(readSize));

バッファオーバーフローの危険

read()lookahead() の実装で引数 pos が範囲内かどうかがチェックされておらず、範囲外の領域を読み込む可能性があります。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ToDo
Development

No branches or pull requests

2 participants