[brasero] Fix a test that could lead to read outside the allocated buffer. May help fixing #606010 - crashes



commit 7092697934d227d6e24976a6e86d29e2a67ee8ad
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Thu Mar 4 13:56:09 2010 +0100

    Fix a test that could lead to read outside the allocated buffer.
    May help fixing #606010 -  crashes at audio CD insertion

 libbrasero-media/brasero-medium.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libbrasero-media/brasero-medium.c b/libbrasero-media/brasero-medium.c
index 783be95..8fe1e88 100644
--- a/libbrasero-media/brasero-medium.c
+++ b/libbrasero-media/brasero-medium.c
@@ -2702,7 +2702,7 @@ _next_CD_TEXT_pack (BraseroScsiCDTextData *cd_text,
 	       cd_text->pack [current].type != BRASERO_SCSI_CD_TEXT_UPC_EAN_ISRC &&
 	       cd_text->pack [current].type != BRASERO_SCSI_CD_TEXT_BLOCK_SIZE) {
 		current ++;
-		if (current > max)
+		if (current >= max)
 			return -1;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]