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
322cd225
Commit
322cd225
authored
Aug 13, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check asprintf return value.
parent
feb988a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
31 deletions
+43
-31
modules/codec/cmml/intf.c
modules/codec/cmml/intf.c
+2
-1
modules/codec/realaudio.c
modules/codec/realaudio.c
+28
-21
modules/control/http/util.c
modules/control/http/util.c
+7
-6
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+6
-3
No files found.
modules/codec/cmml/intf.c
View file @
322cd225
...
...
@@ -584,7 +584,8 @@ char *GetTimedURIFragmentForTime( int seconds )
{
char
*
psz_time
;
asprintf
(
&
psz_time
,
"%d"
,
seconds
);
if
(
asprintf
(
&
psz_time
,
"%d"
,
seconds
)
==
-
1
)
return
NULL
;
return
psz_time
;
}
...
...
modules/codec/realaudio.c
View file @
322cd225
...
...
@@ -345,19 +345,22 @@ static int OpenDll( decoder_t *p_dec )
for
(
i
=
0
;
ppsz_path
[
i
];
i
++
)
{
/* Old format */
asprintf
(
&
psz_dll
,
"%s/%4.4s.so.6.0"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenNativeDll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
if
(
asprintf
(
&
psz_dll
,
"%s/%4.4s.so.6.0"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
)
!=
-
1
)
{
i_result
=
OpenNativeDll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
/* New format */
asprintf
(
&
psz_dll
,
"%s/%4.4s.so"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenNativeDll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
if
(
asprintf
(
&
psz_dll
,
"%s/%4.4s.so"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
)
!=
-
1
)
{
i_result
=
OpenNativeDll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
}
#endif
...
...
@@ -366,18 +369,22 @@ static int OpenDll( decoder_t *p_dec )
for
(
i
=
0
;
ppsz_path
[
i
];
i
++
)
{
/* New format */
asprintf
(
&
psz_dll
,
"%s
\\
%4.4s.dll"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenWin32Dll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
if
(
asprintf
(
&
psz_dll
,
"%s
\\
%4.4s.dll"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
)
!=
-
1
)
{
i_result
=
OpenWin32Dll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
/* Old format */
asprintf
(
&
psz_dll
,
"%s
\\
%4.4s3260.dll"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenWin32Dll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
if
(
asprintf
(
&
psz_dll
,
"%s
\\
%4.4s3260.dll"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
)
!=
-
1
)
{
i_result
=
OpenWin32Dll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
}
#endif
...
...
modules/control/http/util.c
View file @
322cd225
...
...
@@ -315,13 +315,14 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
if
(
b_index
&&
(
p
=
strstr
(
f
->
file
,
"index."
)
)
)
{
asprintf
(
&
psz_redir
,
"%s%s"
,
f
->
name
,
p
);
msg_Dbg
(
p_intf
,
"redir=%s -> %s"
,
psz_redir
,
f
->
name
);
f
->
p_redir2
=
httpd_RedirectNew
(
p_sys
->
p_httpd_host
,
f
->
name
,
psz_redir
);
if
(
asprintf
(
&
psz_redir
,
"%s%s"
,
f
->
name
,
p
)
!=
-
1
)
{
msg_Dbg
(
p_intf
,
"redir=%s -> %s"
,
psz_redir
,
f
->
name
);
f
->
p_redir2
=
httpd_RedirectNew
(
p_sys
->
p_httpd_host
,
f
->
name
,
psz_redir
);
free
(
psz_redir
);
free
(
psz_redir
);
}
}
}
}
...
...
modules/demux/asf/libasf.c
View file @
322cd225
...
...
@@ -1190,17 +1190,20 @@ static int ASF_ReadObject_extended_content_description( stream_t *s,
else
if
(
i_type
==
3
)
{
/* DWord */
asprintf
(
&
p_ec
->
ppsz_value
[
i
],
"%d"
,
ASF_READ4
()
);
if
(
asprintf
(
&
p_ec
->
ppsz_value
[
i
],
"%d"
,
ASF_READ4
()
)
==
-
1
)
p_ec
->
ppsz_value
[
i
]
=
NULL
;
}
else
if
(
i_type
==
4
)
{
/* QWord */
asprintf
(
&
p_ec
->
ppsz_value
[
i
],
"%"
PRId64
,
ASF_READ8
()
);
if
(
asprintf
(
&
p_ec
->
ppsz_value
[
i
],
"%"
PRId64
,
ASF_READ8
()
)
==
-
1
)
p_ec
->
ppsz_value
[
i
]
=
NULL
;
}
else
if
(
i_type
==
5
)
{
/* Word */
asprintf
(
&
p_ec
->
ppsz_value
[
i
],
"%d"
,
ASF_READ2
()
);
if
(
asprintf
(
&
p_ec
->
ppsz_value
[
i
],
"%d"
,
ASF_READ2
()
)
==
-
1
)
p_ec
->
ppsz_value
[
i
]
=
NULL
;
}
else
{
...
...
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