Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a53df53f
Commit
a53df53f
authored
Oct 12, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Oct 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Test NULL pointer for InternetCanonicalizeUrlA.
parent
9b43174f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
internet.c
dlls/wininet/tests/internet.c
+30
-0
No files found.
dlls/wininet/tests/internet.c
View file @
a53df53f
...
...
@@ -83,6 +83,36 @@ static void test_InternetCanonicalizeUrlA(void)
ok
(
res
&&
(
dwSize
==
urllen
)
&&
(
lstrcmpA
(
url
,
buffer
)
==
0
),
"got %u and %u with size %u for '%s' (%d)
\n
"
,
res
,
GetLastError
(),
dwSize
,
buffer
,
lstrlenA
(
buffer
));
/* check NULL pointers */
memset
(
buffer
,
'#'
,
urllen
+
4
);
buffer
[
urllen
+
4
]
=
'\0'
;
dwSize
=
urllen
+
1
;
SetLastError
(
0xdeadbeef
);
res
=
InternetCanonicalizeUrlA
(
NULL
,
buffer
,
&
dwSize
,
0
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"got %u and %u with size %u for '%s' (%d)
\n
"
,
res
,
GetLastError
(),
dwSize
,
buffer
,
lstrlenA
(
buffer
));
memset
(
buffer
,
'#'
,
urllen
+
4
);
buffer
[
urllen
+
4
]
=
'\0'
;
dwSize
=
urllen
+
1
;
SetLastError
(
0xdeadbeef
);
res
=
InternetCanonicalizeUrlA
(
url
,
NULL
,
&
dwSize
,
0
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"got %u and %u with size %u for '%s' (%d)
\n
"
,
res
,
GetLastError
(),
dwSize
,
buffer
,
lstrlenA
(
buffer
));
memset
(
buffer
,
'#'
,
urllen
+
4
);
buffer
[
urllen
+
4
]
=
'\0'
;
dwSize
=
urllen
+
1
;
SetLastError
(
0xdeadbeef
);
res
=
InternetCanonicalizeUrlA
(
url
,
buffer
,
NULL
,
0
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"got %u and %u with size %u for '%s' (%d)
\n
"
,
res
,
GetLastError
(),
dwSize
,
buffer
,
lstrlenA
(
buffer
));
}
/* ############################### */
...
...
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