Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
a874fbbf
Commit
a874fbbf
authored
Jan 02, 2018
by
François Cartegnie
🤞
Browse files
codec: substx3g: use strndup
parent
5cd17d17
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/substx3g.c
View file @
a874fbbf
...
...
@@ -336,11 +336,9 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
}
else
{
psz_subtitle
=
malloc
(
i_psz_bytelength
+
1
);
psz_subtitle
=
strndup
(
(
const
char
*
)
p_pszstart
,
i_psz_bytelength
);
if
(
!
psz_subtitle
)
return
VLCDEC_SUCCESS
;
memcpy
(
psz_subtitle
,
p_pszstart
,
i_psz_bytelength
);
psz_subtitle
[
i_psz_bytelength
]
=
'\0'
;
}
p_buf
+=
i_psz_bytelength
+
sizeof
(
uint16_t
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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