brasero r2198 - in branches/gnome-2-26: . libbrasero-media
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r2198 - in branches/gnome-2-26: . libbrasero-media
- Date: Wed, 1 Apr 2009 18:32:55 +0000 (UTC)
Author: philippr
Date: Wed Apr 1 18:32:55 2009
New Revision: 2198
URL: http://svn.gnome.org/viewvc/brasero?rev=2198&view=rev
Log:
2009-04-01 Philippe Rouquier <bonfire-app wanadoo fr>
Fix for #573929 â nautilus crashed with SIGSEGV in start_thread()
* libbrasero-media/brasero-medium.c
(brasero_medium_get_page_2A_write_speed_desc):
Modified:
branches/gnome-2-26/ChangeLog
branches/gnome-2-26/libbrasero-media/brasero-medium.c
Modified: branches/gnome-2-26/libbrasero-media/brasero-medium.c
==============================================================================
--- branches/gnome-2-26/libbrasero-media/brasero-medium.c (original)
+++ branches/gnome-2-26/libbrasero-media/brasero-medium.c Wed Apr 1 18:32:55 2009
@@ -1367,7 +1367,9 @@
page_2A = (BraseroScsiStatusPage *) &data->page;
- if (size < 18) {
+ /* Reminder: size = sizeof (BraseroScsiStatusPage) + sizeof (BraseroScsiModeHdr) */
+ if (size < (G_STRUCT_OFFSET (BraseroScsiStatusPage, copy_mngt_rev) +
+ sizeof (BraseroScsiModeHdr))) {
g_free (data);
BRASERO_MEDIA_LOG ("wrong page size");
return BRASERO_BURN_ERR;
@@ -1376,8 +1378,11 @@
priv->max_rd = BRASERO_GET_16 (page_2A->rd_max_speed);
priv->max_wrt = BRASERO_GET_16 (page_2A->wr_max_speed);
- /* Check if we can use the speed descriptors; if not use maximum */
- if (size < 20) {
+ /* Check if we can use the speed descriptors. There must be at least one
+ * available; if not use maximum speed member. */
+ if (size < (G_STRUCT_OFFSET (BraseroScsiStatusPage, wr_spd_desc) +
+ sizeof (BraseroScsiModeHdr) +
+ sizeof (BraseroScsiWrtSpdDesc))) {
BRASERO_MEDIA_LOG ("Maximum Speed (Page 2A [old]) %i", priv->max_wrt);
/* also add fake speed descriptors */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]