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
04b1aea5
Commit
04b1aea5
authored
Feb 13, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace forbidden characters with underscores when attempting to dump a stream (closes #423)
parent
49106025
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
modules/access_filter/record.c
modules/access_filter/record.c
+19
-2
No files found.
modules/access_filter/record.c
View file @
04b1aea5
/*****************************************************************************
* record.c
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* Copyright (C) 2005
-2006
the VideoLAN team
* $Id$
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -357,7 +357,7 @@ static void Dump( access_t *p_access, uint8_t *p_buffer, int i_buffer )
if
(
!
p_sys
->
f
)
{
input_thread_t
*
p_input
;
char
*
psz_name
=
NULL
;
char
*
psz_name
=
NULL
,
*
psz
;
time_t
t
=
time
(
NULL
);
struct
tm
l
;
...
...
@@ -403,6 +403,23 @@ static void Dump( access_t *p_access, uint8_t *p_buffer, int i_buffer )
free
(
psz_name
);
/* Remove all forbidden characters (except (back)slashes) */
for
(
psz
=
p_sys
->
psz_file
;
*
psz
;
psz
++
)
{
unsigned
char
c
=
(
unsigned
char
)
*
psz
;
/* Even if many OS accept non printable characters, we remove
* them to avoid confusing users */
if
(
(
c
<
32
)
||
(
c
==
127
)
)
*
psz
=
'_'
;
#if defined (WIN32) || defined (UNDER_CE)
/* Windows has a lot of forbidden characters, even if it has
* fewer than DOS. */
if
(
strchr
(
"
\"
*:<>?|"
,
c
)
!=
NULL
)
*
psz
=
'_'
;
#endif
}
msg_Dbg
(
p_access
,
"dump in file '%s'"
,
p_sys
->
psz_file
);
p_sys
->
f
=
utf8_fopen
(
p_sys
->
psz_file
,
"wb"
);
...
...
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