Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
d3677839
Commit
d3677839
authored
Jun 24, 2007
by
Måns Rullgård
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace strncpy with av_strlcpy
Originally committed as revision 9407 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f7d78f36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
oggparsevorbis.c
libavformat/oggparsevorbis.c
+6
-5
No files found.
libavformat/oggparsevorbis.c
View file @
d3677839
...
...
@@ -27,6 +27,7 @@
#include "bitstream.h"
#include "bswap.h"
#include "ogg2.h"
#include "avstring.h"
extern
int
vorbis_comment
(
AVFormatContext
*
as
,
uint8_t
*
buf
,
int
size
)
...
...
@@ -88,15 +89,15 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size)
// took from Vorbis_I_spec
if
(
!
strcmp
(
tt
,
"AUTHOR"
))
strncpy
(
as
->
author
,
ct
,
FFMIN
(
sizeof
(
as
->
author
),
vl
));
av_strlcpy
(
as
->
author
,
ct
,
sizeof
(
as
->
author
));
else
if
(
!
strcmp
(
tt
,
"TITLE"
))
strncpy
(
as
->
title
,
ct
,
FFMIN
(
sizeof
(
as
->
title
),
vl
));
av_strlcpy
(
as
->
title
,
ct
,
sizeof
(
as
->
title
));
else
if
(
!
strcmp
(
tt
,
"COPYRIGHT"
))
strncpy
(
as
->
copyright
,
ct
,
FFMIN
(
sizeof
(
as
->
copyright
),
vl
));
av_strlcpy
(
as
->
copyright
,
ct
,
sizeof
(
as
->
copyright
));
else
if
(
!
strcmp
(
tt
,
"DESCRIPTION"
))
strncpy
(
as
->
comment
,
ct
,
FFMIN
(
sizeof
(
as
->
comment
),
vl
));
av_strlcpy
(
as
->
comment
,
ct
,
sizeof
(
as
->
comment
));
else
if
(
!
strcmp
(
tt
,
"GENRE"
))
strncpy
(
as
->
genre
,
ct
,
FFMIN
(
sizeof
(
as
->
genre
),
vl
));
av_strlcpy
(
as
->
genre
,
ct
,
sizeof
(
as
->
genre
));
else
if
(
!
strcmp
(
tt
,
"TRACKNUMBER"
))
as
->
track
=
atoi
(
ct
);
//Too bored to add others for today
...
...
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