"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/wininet/cookie.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

cookie.c  (wine-5.12.tar.xz):cookie.c  (wine-5.13.tar.xz)
skipping to change at line 149 skipping to change at line 149
if(ptr == domain.str) if(ptr == domain.str)
return current_domain; return current_domain;
prev_domain = current_domain; prev_domain = current_domain;
current_list = &current_domain->subdomain_list; current_list = &current_domain->subdomain_list;
} }
} }
static WCHAR *create_cookie_url(substr_t domain, substr_t path, substr_t *ret_pa th) static WCHAR *create_cookie_url(substr_t domain, substr_t path, substr_t *ret_pa th)
{ {
WCHAR user[UNLEN], *p, *url; WCHAR *p, *url;
DWORD len, user_len, i; DWORD len, user_len, i;
static const WCHAR cookie_prefix[] = {'C','o','o','k','i','e',':'}; static const WCHAR cookie_prefix[] = {'C','o','o','k','i','e',':'};
user_len = ARRAY_SIZE(user); user_len = 0;
if(!GetUserNameW(user, &user_len)) if(GetUserNameW(NULL, &user_len) || GetLastError() != ERROR_INSUFFICIENT_BUF
return FALSE; FER)
user_len--; return NULL;
/* user_len already accounts for terminating NULL */
len = ARRAY_SIZE(cookie_prefix) + user_len + 1 /* @ */ + domain.len + path.l en; len = ARRAY_SIZE(cookie_prefix) + user_len + 1 /* @ */ + domain.len + path.l en;
url = heap_alloc((len+1) * sizeof(WCHAR)); url = heap_alloc(len * sizeof(WCHAR));
if(!url) if(!url)
return NULL; return NULL;
memcpy(url, cookie_prefix, sizeof(cookie_prefix)); memcpy(url, cookie_prefix, sizeof(cookie_prefix));
p = url + ARRAY_SIZE(cookie_prefix); p = url + ARRAY_SIZE(cookie_prefix);
memcpy(p, user, user_len*sizeof(WCHAR)); if(!GetUserNameW(p, &user_len)) {
heap_free(url);
return NULL;
}
p += user_len; p += user_len;
*p++ = '@'; *(p - 1) = '@';
memcpy(p, domain.str, domain.len*sizeof(WCHAR)); memcpy(p, domain.str, domain.len*sizeof(WCHAR));
p += domain.len; p += domain.len;
for(i=0; i < path.len; i++) for(i=0; i < path.len; i++)
p[i] = towlower(path.str[i]); p[i] = towlower(path.str[i]);
p[path.len] = 0; p[path.len] = 0;
ret_path->str = p; ret_path->str = p;
ret_path->len = path.len; ret_path->len = path.len;
 End of changes. 6 change blocks. 
8 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)