Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ext/soap/php_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ static HashTable* sdl_deserialize_parameters(encodePtr *encoders, sdlTypePtr *ty
return ht;
}

static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time_t *cached)
static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, size_t uri_len, time_t t, time_t *cached)
{
sdlPtr sdl;
time_t old_t;
Expand Down Expand Up @@ -1583,7 +1583,7 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
*cached = old_t;

WSDL_CACHE_GET_INT(i, &in);
if (i == 0 && strncmp(in, uri, i) != 0) {
if (i != uri_len || strncmp(in, uri, i) != 0) {
unlink(fn);
efree(buf);
return NULL;
Expand Down Expand Up @@ -3232,7 +3232,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl)
}
memcpy(key+len,md5str,sizeof(md5str));

if ((sdl = get_sdl_from_cache(key, uri, t-SOAP_GLOBAL(cache_ttl), &cached)) != NULL) {
if ((sdl = get_sdl_from_cache(key, uri, uri_len, t-SOAP_GLOBAL(cache_ttl), &cached)) != NULL) {
t = cached;
efree(key);
goto cache_in_memory;
Expand Down