Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f6d61c2e
Commit
f6d61c2e
authored
Jul 25, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix buffer overflow (up to 1024 bytes)
- Use already existing commodity functions for URL encoding
parent
dc4b750c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
37 deletions
+3
-37
modules/control/http.c
modules/control/http.c
+3
-37
No files found.
modules/control/http.c
View file @
f6d61c2e
...
...
@@ -2853,41 +2853,6 @@ static void uri_decode_url_encoded( char *psz )
free
(
dup
);
}
static
void
uri_encode
(
const
char
*
from
,
char
*
to
,
size_t
to_len
)
{
static
const
char
hex
[]
=
"0123456789abcdef"
;
while
(
*
from
&&
to_len
>
1
)
{
if
(
*
from
==
' '
)
{
*
to
++
=
'+'
;
}
else
if
(
isalnum
(
*
from
)
||
strchr
(
"$-_.+!*'(),/"
,
*
from
)
)
{
*
to
++
=
*
from
;
}
else
{
*
to
++
=
'%'
;
if
(
--
to_len
<=
1
)
break
;
*
to
++
=
hex
[(
*
from
>>
4
)
&
0x0f
];
if
(
--
to_len
<=
1
)
break
;
*
to
++
=
hex
[
*
from
&
0x0f
];
}
to_len
--
;
from
++
;
}
if
(
to_len
>
0
)
*
to
=
'\0'
;
}
/****************************************************************************
* Light RPN evaluator
****************************************************************************/
...
...
@@ -3213,10 +3178,11 @@ static void EvaluateRPN( mvar_t *vars, rpn_stack_t *st, char *exp )
else
if
(
!
strcmp
(
s
,
"url_encode"
)
)
{
char
*
url
=
SSPop
(
st
);
char
value
[
512
]
;
char
*
value
;
uri_encode
(
url
,
value
,
512
);
value
=
vlc_UrlEncode
(
url
);
SSPush
(
st
,
value
);
free
(
value
);
}
else
{
...
...
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