Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
165585bd
Commit
165585bd
authored
Aug 20, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
URI: when pasring for protocol headers allow for more characters than just alpha
parent
a99f23a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
23 deletions
+44
-23
activex/utils.cpp
activex/utils.cpp
+24
-14
mozilla/vlcplugin.cpp
mozilla/vlcplugin.cpp
+20
-9
No files found.
activex/utils.cpp
View file @
165585bd
...
...
@@ -181,10 +181,19 @@ LPWSTR CombineURL(LPCWSTR baseUrl, LPCWSTR url)
{
// validate protocol header
const
wchar_t
*
start
=
url
;
while
(
start
!=
end
)
{
wchar_t
c
=
towlower
(
*
start
);
if
(
(
c
<
L'a'
)
||
(
c
>
L'z'
)
)
// not a valid protocol header, assume relative URL
wchar_t
c
=
*
start
;
if
(
iswalpha
(
c
)
)
{
++
start
;
while
(
start
!=
end
)
{
c
=
*
start
;
if
(
!
(
iswalnum
(
c
)
||
(
L'-'
==
c
)
||
(
L'+'
==
c
)
||
(
L'.'
==
c
)
||
(
L'/'
==
c
))
)
/* VLC uses / to allow user to specify a demuxer */
// not valid protocol header, assume relative URL
goto
relativeurl
;
++
start
;
}
...
...
@@ -198,6 +207,7 @@ LPWSTR CombineURL(LPCWSTR baseUrl, LPCWSTR url)
}
return
href
;
}
}
relativeurl:
...
...
mozilla/vlcplugin.cpp
View file @
165585bd
...
...
@@ -90,7 +90,7 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
{
if
(
i_type
==
REG_SZ
)
{
strcat
(
p_data
,
"
\\
plugins"
);
strcat
(
p_data
,
"
\\
plugins
000
"
);
ppsz_argv
[
ppsz_argc
++
]
=
"--plugin-path"
;
ppsz_argv
[
ppsz_argc
++
]
=
p_data
;
}
...
...
@@ -99,7 +99,7 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
}
ppsz_argv
[
ppsz_argc
++
]
=
"--no-one-instance"
;
#if
0
#if
1
ppsz_argv
[
0
]
=
"C:
\\
Cygwin
\\
home
\\
damienf
\\
vlc-trunk
\\
vlc"
;
#endif
...
...
@@ -290,9 +290,18 @@ char *VlcPlugin::getAbsoluteURL(const char *url)
{
// validate protocol header
const
char
*
start
=
url
;
while
(
start
!=
end
)
{
char
c
=
tolower
(
*
start
);
if
(
(
c
<
'a'
)
||
(
c
>
'z'
)
)
char
c
=
*
start
;
if
(
isalpha
(
c
)
)
{
++
start
;
while
(
start
!=
end
)
{
c
=
*
start
;
if
(
!
(
isalnum
(
c
)
||
(
'-'
==
c
)
||
(
'+'
==
c
)
||
(
'.'
==
c
)
||
(
'/'
==
c
))
)
/* VLC uses / to allow user to specify a demuxer */
// not valid protocol header, assume relative URL
goto
relativeurl
;
++
start
;
...
...
@@ -300,6 +309,8 @@ char *VlcPlugin::getAbsoluteURL(const char *url)
/* we have a protocol header, therefore URL is absolute */
return
strdup
(
url
);
}
// not a valid protocol header, assume relative URL
}
relativeurl:
...
...
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