projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
488e58b
)
Coverity: Uninit: CID 473
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Sun, 15 Jan 2012 02:47:51 +0000
(21:47 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Sun, 15 Jan 2012 02:47:51 +0000
(21:47 -0500)
* src/media/media-sndfile.c (media_sndfile_open): Make sure to
only call sf_open if file name was properly converted.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/media/media-sndfile.c
patch
|
blob
|
history
diff --git
a/src/media/media-sndfile.c
b/src/media/media-sndfile.c
index
5bf16bb
..
d6e86da
100644
(file)
--- a/
src/media/media-sndfile.c
+++ b/
src/media/media-sndfile.c
@@
-98,14
+98,16
@@
media_sndfile_open(Lisp_Media_Stream *ms)
switch (media_stream_kind(ms)) {
case MKIND_FILE: {
mkind_file_properties *mkfp = NULL;
- const char *file;
+ const char *file
= NULL
;
int file_len = 0;
/* open the file */
mkfp = media_stream_kind_properties(ms).fprops;
TO_EXTERNAL_FORMAT(LISP_STRING, mkfp->filename,
ALLOCA, (file, file_len), Qnil);
- sf = sf_open(file, SFM_READ, sfinfo);
+ if ( file != NULL ) {
+ sf = sf_open(file, SFM_READ, sfinfo);
+ }
break;
}
case MKIND_STRING: {