libaacs | branch: master | npzacs <npz...@gmail.com> | Mon Oct 7 09:46:06 2013 +0300| [fb59dc8a04b58c60565138d4952c3aad2a26fa10] | committer: npzacs
Fixed using uninitialized agid in _mmc_aacs_auth() > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=fb59dc8a04b58c60565138d4952c3aad2a26fa10 --- src/libaacs/mmc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libaacs/mmc.c b/src/libaacs/mmc.c index 9ae5165..03f3e64 100644 --- a/src/libaacs/mmc.c +++ b/src/libaacs/mmc.c @@ -1021,9 +1021,9 @@ static int _verify_signature(const uint8_t *cert, const uint8_t *signature, return crypto_aacs_verify(cert, signature, data, 60); } -static int _mmc_aacs_auth(MMC *mmc, const uint8_t *host_priv_key, const uint8_t *host_cert, uint8_t *bus_key) +static int _mmc_aacs_auth(MMC *mmc, uint8_t agid, const uint8_t *host_priv_key, const uint8_t *host_cert, uint8_t *bus_key) { - uint8_t agid = 0, hks[40], dn[20], dkp[40], dks[40]; + uint8_t hks[40], dn[20], dkp[40], dks[40]; char str[512]; memset(hks, 0, sizeof(hks)); @@ -1118,7 +1118,7 @@ int mmc_read_vid(MMC *mmc, const uint8_t *host_priv_key, const uint8_t *host_cer } DEBUG(DBG_MMC, "Got AGID from drive: %d\n", agid); - error_code = _mmc_aacs_auth(mmc, host_priv_key, host_cert, bus_key); + error_code = _mmc_aacs_auth(mmc, agid, host_priv_key, host_cert, bus_key); if (error_code) { return error_code; } @@ -1186,7 +1186,7 @@ int mmc_read_data_keys(MMC *mmc, const uint8_t *host_priv_key, const uint8_t *ho * keys are being read */ - error_code = _mmc_aacs_auth(mmc, host_priv_key, host_cert, bus_key); + error_code = _mmc_aacs_auth(mmc, agid, host_priv_key, host_cert, bus_key); if (error_code) { return error_code; } _______________________________________________ libaacs-devel mailing list libaacs-devel@videolan.org https://mailman.videolan.org/listinfo/libaacs-devel