openssl/openssl
在 GitHub 查看win32_joiner() in crypto/dso/dso_win32.c writes 1 byte past the allocation when the directory has no trailing separator and file is NULL
Open
#31,260 建立於 2026年5月20日
branch: 3.0branch: 3.4branch: 3.5branch: 3.6branch: 4.0good first issuetriaged: bug
描述
In win32_joiner() (crypto/dso/dso_win32.c), the directory trailing-separator is budgeted into len only when file_split->file is non-NULL but is emitted unconditionally by the directory loop; when dir is set without a trailing separator and file == NULL, the final result[offset] = '\0' writes one byte past OPENSSL_malloc(len + 1).