Commit a468084e authored by Philippe Rouquier's avatar Philippe Rouquier Committed by Philippe Rouquier

Fix for #573929 – nautilus crashed with SIGSEGV in start_thread()

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):

svn path=/trunk/; revision=2197
parent 8c0468d5
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):
2009-04-01 Philippe Rouquier <bonfire-app@wanadoo.fr>
Add a missing header to be installed
......
......@@ -1362,7 +1362,9 @@ brasero_medium_get_page_2A_write_speed_desc (BraseroMedium *self,
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;
......@@ -1371,8 +1373,11 @@ brasero_medium_get_page_2A_write_speed_desc (BraseroMedium *self,
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 */
......
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