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



commit 6f86ef38d3c079dc68ba1b160885033c93c9bdd5
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 6be5564..4db33ea 100644
--- a/libbrasero-media/brasero-medium.c
+++ b/libbrasero-media/brasero-medium.c
@@ -2701,7 +2701,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]