Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
3059bd8f
Commit
3059bd8f
authored
Aug 20, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check malloc return value.
parent
70db1cf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+9
-6
modules/mux/asf.c
modules/mux/asf.c
+6
-0
No files found.
modules/meta_engine/taglib.cpp
View file @
3059bd8f
...
...
@@ -299,12 +299,15 @@ static int ReadMeta( vlc_object_t *p_this )
* terminated string */
char
*
psz_ufid
=
(
char
*
)
malloc
(
64
);
int
j
=
0
;
while
(
(
j
<
63
)
&&
(
j
<
p_ufid
->
identifier
().
size
()
)
)
psz_ufid
[
j
]
=
p_ufid
->
identifier
()[
j
++
];
psz_ufid
[
j
]
=
'\0'
;
vlc_meta_SetTrackID
(
p_meta
,
psz_ufid
);
free
(
psz_ufid
);
if
(
psz_ufid
)
{
while
(
(
j
<
63
)
&&
(
j
<
p_ufid
->
identifier
().
size
()
)
)
psz_ufid
[
j
]
=
p_ufid
->
identifier
()[
j
++
];
psz_ufid
[
j
]
=
'\0'
;
vlc_meta_SetTrackID
(
p_meta
,
psz_ufid
);
free
(
psz_ufid
);
}
}
}
...
...
modules/mux/asf.c
View file @
3059bd8f
...
...
@@ -201,6 +201,8 @@ static int Open( vlc_object_t *p_this )
p_mux
->
pf_mux
=
Mux
;
p_mux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
sout_mux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
p_sys
->
b_asf_http
=
p_mux
->
psz_mux
&&
!
strcmp
(
p_mux
->
psz_mux
,
"asfh"
);
if
(
p_sys
->
b_asf_http
)
{
...
...
@@ -449,6 +451,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
tk
->
i_extra
=
sizeof
(
WAVEFORMATEX
)
+
p_input
->
p_fmt
->
i_extra
+
i_extra
;
tk
->
p_extra
=
malloc
(
tk
->
i_extra
);
if
(
!
tk
->
p_extra
)
return
VLC_ENOMEM
;
bo_init
(
&
bo
,
tk
->
p_extra
,
tk
->
i_extra
);
bo_addle_u16
(
&
bo
,
tk
->
i_tag
);
bo_addle_u16
(
&
bo
,
p_input
->
p_fmt
->
audio
.
i_channels
);
...
...
@@ -506,6 +510,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
tk
->
i_extra
=
11
+
sizeof
(
BITMAPINFOHEADER
)
+
p_input
->
p_fmt
->
i_extra
;
tk
->
p_extra
=
malloc
(
tk
->
i_extra
);
if
(
!
tk
->
p_extra
)
return
VLC_ENOMEM
;
bo_init
(
&
bo
,
tk
->
p_extra
,
tk
->
i_extra
);
bo_addle_u32
(
&
bo
,
p_input
->
p_fmt
->
video
.
i_width
);
bo_addle_u32
(
&
bo
,
p_input
->
p_fmt
->
video
.
i_height
);
...
...
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