Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
346ae7a9
Commit
346ae7a9
authored
Oct 04, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MP4: use strcpsn() and check one malloc()
parent
11cd9e3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+2
-7
No files found.
modules/demux/mp4/libmp4.c
View file @
346ae7a9
...
@@ -3203,17 +3203,12 @@ static void get_token( char **ppsz_path, char **ppsz_token, int *pi_number )
...
@@ -3203,17 +3203,12 @@ static void get_token( char **ppsz_path, char **ppsz_token, int *pi_number )
*
pi_number
=
0
;
*
pi_number
=
0
;
return
;
return
;
}
}
i_len
=
0
;
i_len
=
strcspn
(
*
ppsz_path
,
"/["
);
while
(
(
*
ppsz_path
)[
i_len
]
&&
(
*
ppsz_path
)[
i_len
]
!=
'/'
&&
(
*
ppsz_path
)[
i_len
]
!=
'['
)
{
i_len
++
;
}
if
(
!
i_len
&&
**
ppsz_path
==
'/'
)
if
(
!
i_len
&&
**
ppsz_path
==
'/'
)
{
{
i_len
=
1
;
i_len
=
1
;
}
}
*
ppsz_token
=
malloc
(
i_len
+
1
);
*
ppsz_token
=
x
malloc
(
i_len
+
1
);
memcpy
(
*
ppsz_token
,
*
ppsz_path
,
i_len
);
memcpy
(
*
ppsz_token
,
*
ppsz_path
,
i_len
);
...
...
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