GH-131296: Avoid invalid signed char comparison in getpath.c assertion (GH-131594)

This commit is contained in:
Chris Eibl 2025-04-22 15:06:30 +02:00 committed by GitHub
parent 79f7c67bf6
commit f663b2c56a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -690,7 +690,7 @@ env_to_dict(PyObject *dict, const char *key, int and_clear)
// Quick convert to wchar_t, since we know key is ASCII
wchar_t *wp = wkey;
for (const char *p = &key[4]; *p; ++p) {
assert(*p < 128);
assert(!(*p & 0x80));
*wp++ = *p;
}
*wp = L'\0';