From 9a35a0fcd374613e7f3c037eeadbfde4866c75c3 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 13 Oct 2009 20:10:07 +0000 Subject: [PATCH] add safeguard for UpdateIniFromRegistry on NULL arg --- win32/registry.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/win32/registry.c b/win32/registry.c index 344b5fced5..7098da52e3 100644 --- a/win32/registry.c +++ b/win32/registry.c @@ -168,6 +168,10 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC) int path_len; HashTable **pht; + if(!path) { + return; + } + if (!PW32G(registry_directories)) { PW32G(registry_directories) = (HashTable*)malloc(sizeof(HashTable)); zend_hash_init(PW32G(registry_directories), 0, NULL, delete_internal_hashtable, 1); -- 2.40.0