From 6ea6b37096f06112d235269fd88d5d0772d6d1fc Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 20 Apr 2016 10:14:48 +0200 Subject: [PATCH] jsproxy: Don't use the length parameters in InternetGetProxyInfo. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/jsproxy/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/jsproxy/main.c b/dlls/jsproxy/main.c index e277a0b768e..d5c3e72c513 100644 --- a/dlls/jsproxy/main.c +++ b/dlls/jsproxy/main.c @@ -97,7 +97,7 @@ static inline BOOL heap_free( LPVOID mem ) return HeapFree( GetProcessHeap(), 0, mem ); } -static inline WCHAR *strdupAW( const char *src, DWORD len ) +static inline WCHAR *strdupAW( const char *src, int len ) { WCHAR *dst = NULL; if (src) @@ -628,8 +628,8 @@ BOOL WINAPI InternetGetProxyInfo( LPCSTR url, DWORD len_url, LPCSTR hostname, DW EnterCriticalSection( &cs_jsproxy ); if (!global_script->text) goto done; - if (!(urlW = strdupAW( url, len_url ))) goto done; - if (hostname && !(hostnameW = strdupAW( hostname, len_hostname ))) goto done; + if (!(urlW = strdupAW( url, -1 ))) goto done; + if (hostname && !(hostnameW = strdupAW( hostname, -1 ))) goto done; TRACE( "%s\n", debugstr_w(global_script->text) ); ret = run_script( global_script->text, urlW, hostnameW, proxy, len_proxy );