Commit c3e76f60 authored by npzacs's avatar npzacs
Browse files

Fixed buffer overflow when logging large MMC data buffers

parent 260b8add
......@@ -3,6 +3,7 @@
- Renamed libaacs_test to aacs_info
- Added aacs_get_mkb_version()
- Fixed memory leaks
- Fixed buffer overflow
2012-03-21: Version 0.3.1
- Added configure option for libgcrypt prefix
......
......@@ -135,9 +135,9 @@ static int _mmc_send_cmd(MMC *mmc, const uint8_t *cmd, uint8_t *buf, size_t tx,
DEBUG(DBG_MMC, "Send LINUX MMC cmd %s: (%p)\n",
print_hex(str, cmd, 16), mmc);
if (tx) {
DEBUG(DBG_MMC, " Buffer: %s -> (%p)\n", print_hex(str, buf, tx), mmc);
DEBUG(DBG_MMC, " Buffer: %s -> (%p)\n", print_hex(str, buf, tx>255?255:tx), mmc);
} else {
DEBUG(DBG_MMC, " Buffer: %s <- (%p)\n", print_hex(str, buf, rx), mmc);
DEBUG(DBG_MMC, " Buffer: %s <- (%p)\n", print_hex(str, buf, rx>255?255:rx), mmc);
}
if (a >= 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment