Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
58efbe97
Commit
58efbe97
authored
Aug 27, 2008
by
Louis Lenders
Committed by
Alexandre Julliard
Aug 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix UrlUnEscape to expand URLs in-place even if the output buffer is NULL.
parent
d571636d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
url.c
dlls/shlwapi/tests/url.c
+0
-4
url.c
dlls/shlwapi/url.c
+8
-4
No files found.
dlls/shlwapi/tests/url.c
View file @
58efbe97
...
...
@@ -937,21 +937,17 @@ static void test_UrlUnescape(void)
ok
(
!
strcmp
(
inplace
,
expected
),
"got %s expected %s
\n
"
,
inplace
,
expected
);
ok
(
dwEscaped
==
27
,
"got %d expected 27
\n
"
,
dwEscaped
);
todo_wine
{
/* if we set the bufferpointer to NULL, the string apparently still gets converted (Google Lively does this)) */
ok
(
UrlUnescapeA
(
another_inplace
,
NULL
,
NULL
,
URL_UNESCAPE_INPLACE
)
==
S_OK
,
"UrlUnescapeA failed unexpectedly
\n
"
);
ok
(
!
strcmp
(
another_inplace
,
expected
),
"got %s expected %s
\n
"
,
another_inplace
,
expected
);
}
dwEscaped
=
sizeof
(
inplaceW
);
ok
(
UrlUnescapeW
(
inplaceW
,
NULL
,
&
dwEscaped
,
URL_UNESCAPE_INPLACE
)
==
S_OK
,
"UrlUnescapeW failed unexpectedly
\n
"
);
ok
(
dwEscaped
==
50
,
"got %d expected 50
\n
"
,
dwEscaped
);
todo_wine
{
/* if we set the bufferpointer to NULL, the string apparently still gets converted (Google Lively does this)) */
ok
(
UrlUnescapeW
(
another_inplaceW
,
NULL
,
NULL
,
URL_UNESCAPE_INPLACE
)
==
S_OK
,
"UrlUnescapeW failed unexpectedly
\n
"
);
ok
(
lstrlenW
(
another_inplaceW
)
==
24
,
"got %d expected 24
\n
"
,
lstrlenW
(
another_inplaceW
));
}
}
...
...
dlls/shlwapi/url.c
View file @
58efbe97
...
...
@@ -1155,13 +1155,15 @@ HRESULT WINAPI UrlUnescapeA(
TRACE
(
"(%s, %p, %p, 0x%08x)
\n
"
,
debugstr_a
(
pszUrl
),
pszUnescaped
,
pcchUnescaped
,
dwFlags
);
if
(
!
pszUrl
||
(
!
pszUnescaped
&&
!
(
dwFlags
&
URL_UNESCAPE_INPLACE
))
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
if
(
!
pszUrl
)
return
E_INVALIDARG
;
if
(
dwFlags
&
URL_UNESCAPE_INPLACE
)
dst
=
pszUrl
;
else
{
if
(
!
pszUnescaped
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
dst
=
pszUnescaped
;
}
for
(
src
=
pszUrl
,
needed
=
0
;
*
src
;
src
++
,
needed
++
)
{
if
(
dwFlags
&
URL_DONT_UNESCAPE_EXTRA_INFO
&&
...
...
@@ -1222,13 +1224,15 @@ HRESULT WINAPI UrlUnescapeW(
TRACE
(
"(%s, %p, %p, 0x%08x)
\n
"
,
debugstr_w
(
pszUrl
),
pszUnescaped
,
pcchUnescaped
,
dwFlags
);
if
(
!
pszUrl
||
(
!
pszUnescaped
&&
!
(
dwFlags
&
URL_UNESCAPE_INPLACE
))
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
if
(
!
pszUrl
)
return
E_INVALIDARG
;
if
(
dwFlags
&
URL_UNESCAPE_INPLACE
)
dst
=
pszUrl
;
else
{
if
(
!
pszUnescaped
||
!
pcchUnescaped
)
return
E_INVALIDARG
;
dst
=
pszUnescaped
;
}
for
(
src
=
pszUrl
,
needed
=
0
;
*
src
;
src
++
,
needed
++
)
{
if
(
dwFlags
&
URL_DONT_UNESCAPE_EXTRA_INFO
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment