]> git.ipfire.org Git - thirdparty/ccache.git/commit
test: Handle GetVolumePathName errors, prevent access violation (#1626)
authorautoantwort <41973254+autoantwort@users.noreply.github.com>
Wed, 10 Sep 2025 16:48:42 +0000 (18:48 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Sep 2025 16:48:42 +0000 (18:48 +0200)
commit4cb8702a7bb52ed859564822011958a62c3582f2
treeca48c6ea420825e95ff87c72f2a20d92f5a3c757
parent8810fadab0b59c03cff4c4dc24b00c571a0786ba
test: Handle GetVolumePathName errors, prevent access violation (#1626)

For example GetVolumePathName returns `F:/git_projects` on my computer which
does not fit in a char[4]. As a result GetVolumePathName returns an error and
a std::string is initialized from uninitialized memory which may not contain
a '\0' resulting in out of bounds memory reads.

Co-authored-by: Leander Schulten <Leander.Schulten@tetys.de>
unittest/test_argprocessing.cpp