libaacs | branch: master | npzacs <npz...@gmail.com> | Fri Jan 30 11:24:00 2015 +0200| [c54891ba13b5a37fe5c6b96fcaa1d688978ab515] | committer: npzacs
mmc: check for NULL path > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=c54891ba13b5a37fe5c6b96fcaa1d688978ab515 --- src/libaacs/mmc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libaacs/mmc.c b/src/libaacs/mmc.c index 8811795..e3b0fe6 100644 --- a/src/libaacs/mmc.c +++ b/src/libaacs/mmc.c @@ -340,7 +340,13 @@ static int _mmc_read_data_keys(MMC *mmc, uint8_t agid, uint8_t *read_data_key, u MMC *mmc_open(const char *path) { - MMC *mmc = calloc(1, sizeof(MMC)); + MMC *mmc; + + if (!path) { + return NULL; + } + + mmc = calloc(1, sizeof(MMC)); crypto_create_nonce(mmc->host_nonce, sizeof(mmc->host_nonce)); _______________________________________________ libaacs-devel mailing list libaacs-devel@videolan.org https://mailman.videolan.org/listinfo/libaacs-devel