brasero r1252 - in trunk: . src src/plugins/checksum
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1252 - in trunk: . src src/plugins/checksum
- Date: Sun, 7 Sep 2008 12:55:40 +0000 (UTC)
Author: philippr
Date: Sun Sep 7 12:55:40 2008
New Revision: 1252
URL: http://svn.gnome.org/viewvc/brasero?rev=1252&view=rev
Log:
Fix some problems with our reading ISO images
That fixes problems mentioned in #543377 â No multisession
* src/burn-iso9660.c (brasero_iso9660_read_susp),
(brasero_iso9660_get_susp),
(brasero_iso9660_read_directory_record),
(brasero_iso9660_read_directory_records),
(brasero_iso9660_lookup_directory_record_RR),
(brasero_iso9660_lookup_directory_records):
* src/burn-susp.c (brasero_susp_ER), (brasero_susp_read):
* src/burn-susp.h:
* src/plugins/checksum/burn-checksum-files.c
(brasero_checksum_files_merge_with_former_session):
Modified:
trunk/ChangeLog
trunk/src/burn-iso9660.c
trunk/src/burn-susp.c
trunk/src/burn-susp.h
trunk/src/plugins/checksum/burn-checksum-files.c
Modified: trunk/src/burn-iso9660.c
==============================================================================
--- trunk/src/burn-iso9660.c (original)
+++ trunk/src/burn-iso9660.c Sun Sep 7 12:55:40 2008
@@ -262,7 +262,7 @@
}
offset = susp_ctx->CE_offset;
- len = susp_ctx->CE_len;
+ len = MIN (susp_ctx->CE_len, sizeof (CE_block) - offset);
/* reset information about the CE area */
memset (&susp_ctx->CE_address, 0, sizeof (susp_ctx->CE_address));
@@ -290,7 +290,7 @@
static gchar *
brasero_iso9660_get_susp (BraseroIsoCtx *ctx,
BraseroIsoDirRec *record,
- gint *susp_len)
+ guint *susp_len)
{
gchar *susp_block;
gint start;
@@ -304,16 +304,18 @@
if (ctx->susp_skip)
start += ctx->susp_skip;
- len = record->record_size - start;
- if (len < 0)
+ /* we don't want to go beyond end of buffer */
+ if (start >= record->record_size)
return NULL;
- if (susp_len)
- *susp_len = len;
+ len = record->record_size - start;
if (len <= 0)
return NULL;
+ if (susp_len)
+ *susp_len = len;
+
susp_block = ((gchar *) record) + start;
BRASERO_BURN_LOG ("Got susp block");
@@ -443,7 +445,7 @@
{
gchar *susp;
gint address;
- gint susp_len;
+ guint susp_len = 0;
BraseroSuspCtx susp_ctx;
BraseroVolFile *directory;
@@ -536,7 +538,7 @@
/* look for "SP" SUSP if it's root directory */
if (ctx->is_root) {
BraseroSuspCtx susp_ctx;
- gint susp_len;
+ guint susp_len = 0;
gchar *susp;
susp = brasero_iso9660_get_susp (ctx, record, &susp_len);
@@ -602,14 +604,13 @@
if (ctx->has_RR) {
BraseroSuspCtx susp_ctx = { NULL, };
- gint susp_len = 0;
+ guint susp_len = 0;
gchar *susp;
/* See if we've got a susp area. Do it now to see if it
* has a CL entry. The rest will be checked later after
* reading contents. Otherwise we wouldn't be able to
- * get deep directories that are flagged as files.
- */
+ * get deep directories that are flagged as files. */
susp = brasero_iso9660_get_susp (ctx, record, &susp_len);
if (!brasero_iso9660_read_susp (ctx, &susp_ctx, susp, susp_len)) {
BRASERO_BURN_LOG ("Could not read susp area");
@@ -747,7 +748,7 @@
BraseroVolFile *entry = NULL;
BraseroSuspCtx susp_ctx;
gchar record_name [256];
- gint susp_len = 0;
+ guint susp_len = 0;
gchar *susp;
/* See if we've got a susp area. Do it now to see if it
@@ -860,7 +861,7 @@
* should tell us whether Rock Ridge could be used. */
if (ctx->is_root) {
BraseroSuspCtx susp_ctx;
- gint susp_len;
+ guint susp_len = 0;
gchar *susp;
susp = brasero_iso9660_get_susp (ctx, record, &susp_len);
Modified: trunk/src/burn-susp.c
==============================================================================
--- trunk/src/burn-susp.c (original)
+++ trunk/src/burn-susp.c Sun Sep 7 12:55:40 2008
@@ -31,7 +31,7 @@
struct _BraseroSusp {
gchar signature [2];
- gchar len;
+ guchar len;
gchar version;
gchar data [0];
};
@@ -139,6 +139,11 @@
if (susp->version != 1)
return FALSE;
+ if (er->id_len == 9 && !strncmp (er->id, "IEEE_1282", 9)) {
+ ctx->has_RockRidge = TRUE;
+ return TRUE;
+ }
+
if (er->id_len != 10)
return TRUE;
@@ -233,7 +238,7 @@
}
gboolean
-brasero_susp_read (BraseroSuspCtx *ctx, gchar *buffer, gint max)
+brasero_susp_read (BraseroSuspCtx *ctx, gchar *buffer, guint max)
{
BraseroSusp *susp;
gint offset;
Modified: trunk/src/burn-susp.h
==============================================================================
--- trunk/src/burn-susp.h (original)
+++ trunk/src/burn-susp.h Sun Sep 7 12:55:40 2008
@@ -54,7 +54,7 @@
brasero_susp_ctx_clean (BraseroSuspCtx *ctx);
gboolean
-brasero_susp_read (BraseroSuspCtx *ctx, gchar *buffer, gint max);
+brasero_susp_read (BraseroSuspCtx *ctx, gchar *buffer, guint max);
G_END_DECLS
Modified: trunk/src/plugins/checksum/burn-checksum-files.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-files.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-files.c Sun Sep 7 12:55:40 2008
@@ -452,7 +452,7 @@
brasero_device_handle_close (dev_handle);
return BRASERO_BURN_CANCEL;
}
-g_print ("BUFFER %s\n", buffer);
+
result = brasero_checksum_file_process_former_line (self,
track,
buffer,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]