cd-info.c iso-info.c More error-tolerant patch from Stanislav Brabec

at SuSE.

 iso9660.hpp: patch to compile libcdio with gcc 4.3 from
Cristian Rodriguez via Stanislav Brabec. Add return statement in
function returning non-void.

mmc-tool.c: remove out-of-bound array access.
This commit is contained in:
rocky
2008-01-09 04:26:23 +00:00
parent b6868ddc8f
commit 1f8a5f9d54
4 changed files with 34 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: mmc-tool.c,v 1.9 2006/04/14 22:17:08 rocky Exp $
$Id: mmc-tool.c,v 1.10 2008/01/09 04:26:24 rocky Exp $
Copyright (C) 2006 Rocky Bernstein <rocky@cpan.org>
@@ -261,7 +261,7 @@ parse_options (int argc, char *argv[])
}
static void
print_mode_sense (unsigned int i_mmc_size, const uint8_t buf[22])
print_mode_sense (unsigned int i_mmc_size, const uint8_t buf[30])
{
printf("Mode sense %d information\n", i_mmc_size);
if (buf[2] & 0x01) {
@@ -461,7 +461,7 @@ main(int argc, char *argv[])
break;
case OP_MODE_SENSE_2A:
{
uint8_t buf[22] = { 0, }; /* Place to hold returned data */
uint8_t buf[30] = { 0, }; /* Place to hold returned data */
if (p_op->arg.i_num == 10) {
rc = mmc_mode_sense_10(p_cdio, buf, sizeof(buf),
CDIO_MMC_CAPABILITIES_PAGE);