Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
cb6e4c62
Commit
cb6e4c62
authored
Aug 20, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decode_URI_duplicate: fix error handling
parent
d6e4d5a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
src/test/url.c
src/test/url.c
+2
-2
src/text/url.c
src/text/url.c
+5
-1
No files found.
src/test/url.c
View file @
cb6e4c62
...
@@ -101,8 +101,8 @@ int main (void)
...
@@ -101,8 +101,8 @@ int main (void)
test_decode
(
"%7E"
,
"~"
);
test_decode
(
"%7E"
,
"~"
);
/* tests with invalid input */
/* tests with invalid input */
test_decode
(
"%"
,
"%"
);
test_decode
(
"%"
,
NULL
);
test_decode
(
"%2"
,
"%2"
);
test_decode
(
"%2"
,
NULL
);
test_decode
(
"%0000"
,
""
);
test_decode
(
"%0000"
,
""
);
/* Non-ASCII tests */
/* Non-ASCII tests */
...
...
src/text/url.c
View file @
cb6e4c62
...
@@ -41,7 +41,11 @@
...
@@ -41,7 +41,11 @@
char
*
decode_URI_duplicate
(
const
char
*
str
)
char
*
decode_URI_duplicate
(
const
char
*
str
)
{
{
char
*
buf
=
strdup
(
str
);
char
*
buf
=
strdup
(
str
);
decode_URI
(
buf
);
if
(
decode_URI
(
buf
)
==
NULL
)
{
free
(
buf
);
buf
=
NULL
;
}
return
buf
;
return
buf
;
}
}
...
...
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