diff options
author | Tristan Matthews <le.businessman@gmail.com> | 2014-11-03 22:39:14 -0500 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-11-04 06:10:52 -0800 |
commit | 1b8e3a106c75fb9fba11be2480ce8181bf0f6026 (patch) | |
tree | 63bd917e5760a9a324667fb4b4820a0ddb56a2cf | |
parent | 576d9edf8f3920a8cc918e143d03ebba834ec808 (diff) |
caf: avoid NULL dereference
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
-rw-r--r-- | src/caf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -740,7 +740,7 @@ caf_read_chanmap (SF_PRIVATE * psf, sf_count_t chunk_size) if (bytesread < chunk_size) psf_binheader_readf (psf, "j", chunk_size - bytesread) ; - if (map_info->channel_map != NULL) + if (map_info && map_info->channel_map != NULL) { size_t chanmap_size = psf->sf.channels * sizeof (psf->channel_map [0]) ; free (psf->channel_map) ; |