diff options
author | Marc-André Lureau <marc-andre.lureau@nokia.com> | 2009-02-17 22:46:41 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-17 23:54:51 +0200 |
commit | e2f70b056ea752e83b4de7f1d11e08375e7db991 (patch) | |
tree | 3f606e830c273e530128acffbc9c52e6f7481b9a /sbc/sbc.c | |
parent | 8e544e0dac1a421da2260914406b0e2e11f14668 (diff) |
sbc: don't dereference sbc pointer if NULL
Diffstat (limited to 'sbc/sbc.c')
-rw-r--r-- | sbc/sbc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -985,7 +985,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output, char *ptr; int i, ch, framelen, samples; - if (!sbc && !input) + if (!sbc || !input) return -EIO; priv = sbc->priv; @@ -1053,7 +1053,7 @@ int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output, const uint8_t *pcm, int16_t X[2][SBC_X_BUFFER_SIZE], int nsamples, int nchannels); - if (!sbc && !input) + if (!sbc || !input) return -EIO; priv = sbc->priv; |