diff options
| author | orbisai0security <mediratta01.pally@gmail.com> | 2026-06-15 01:30:15 +0000 |
|---|---|---|
| committer | orbisai0security <mediratta01.pally@gmail.com> | 2026-06-15 01:30:15 +0000 |
| commit | afbf81afc42b8bce9987fe1a0715cb2fe2199e0c (patch) | |
| tree | 2c7d7dc33c737ccb0d8559b205747e55ac9b4e68 /include | |
| parent | 00b7d56c290e4cdceeddbb98497c9ff23c49dc32 (diff) | |
| download | portable-afbf81afc42b8bce9987fe1a0715cb2fe2199e0c.tar.gz portable-afbf81afc42b8bce9987fe1a0715cb2fe2199e0c.tar.bz2 portable-afbf81afc42b8bce9987fe1a0715cb2fe2199e0c.zip | |
fix: V-002 security vulnerability
Automated security fix generated by OrbisAI Security
Diffstat (limited to 'include')
| -rw-r--r-- | include/compat/dirent_msvc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/compat/dirent_msvc.h b/include/compat/dirent_msvc.h index 67f295f..e8a0956 100644 --- a/include/compat/dirent_msvc.h +++ b/include/compat/dirent_msvc.h | |||
| @@ -165,7 +165,8 @@ _wopendir(const wchar_t *dirname) | |||
| 165 | n = GetFullPathNameW(dirname, 0, NULL, NULL); | 165 | n = GetFullPathNameW(dirname, 0, NULL, NULL); |
| 166 | 166 | ||
| 167 | /* Allocate room for absolute directory name and search pattern */ | 167 | /* Allocate room for absolute directory name and search pattern */ |
| 168 | dirp->patt =(wchar_t*) malloc(sizeof(wchar_t) * n + 16); | 168 | if (n <= (SIZE_MAX - 16) / sizeof(wchar_t)) |
| 169 | dirp->patt =(wchar_t*) malloc(sizeof(wchar_t) * n + 16); | ||
| 169 | if (dirp->patt) { | 170 | if (dirp->patt) { |
| 170 | 171 | ||
| 171 | /* | 172 | /* |
