mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
tsrm_win32_get_path_sid_key might returns NULL (Partially fix bug #71752)
cherry-picked from 7d5f71b0b1
This commit is contained in:
committed by
Anatol Belski
parent
915a3762ef
commit
67f0770036
@@ -587,12 +587,14 @@ static inline unsigned long realpath_cache_key(const char *path, int path_len TS
|
||||
register unsigned long h;
|
||||
char *bucket_key_start = tsrm_win32_get_path_sid_key(path TSRMLS_CC);
|
||||
char *bucket_key = (char *)bucket_key_start;
|
||||
const char *e = bucket_key + strlen(bucket_key);
|
||||
const char *e;
|
||||
|
||||
if (!bucket_key) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
e = bucket_key + strlen(bucket_key);
|
||||
|
||||
for (h = 2166136261U; bucket_key < e;) {
|
||||
h *= 16777619;
|
||||
h ^= *bucket_key++;
|
||||
|
||||
Reference in New Issue
Block a user