forked from pool/libmirage
Jan Engelhardt
6191d8e8d7
OBS-URL: https://build.opensuse.org/package/show/filesystems/libmirage?expand=0&rev=10
26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
From 0a79a47489bf739d97d416bc740fc081704a13b1 Mon Sep 17 00:00:00 2001
|
|
From: Rok Mandeljc <rok.mandeljc@gmail.com>
|
|
Date: Sun, 24 Feb 2013 20:25:17 +0100
|
|
Subject: [PATCH] libMirage: READCD Parser: when verifying the file, don't
|
|
forget to seek to the beginning first.
|
|
|
|
---
|
|
libmirage/src/parsers/image-readcd/image-readcd-parser.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/libmirage/src/parsers/image-readcd/image-readcd-parser.c b/libmirage/src/parsers/image-readcd/image-readcd-parser.c
|
|
index 39c0522..9b8a76b 100644
|
|
--- a/libmirage/src/parsers/image-readcd/image-readcd-parser.c
|
|
+++ b/libmirage/src/parsers/image-readcd/image-readcd-parser.c
|
|
@@ -58,6 +58,7 @@ static gboolean mirage_parser_readcd_is_file_valid (MirageParserReadcd *self, GI
|
|
|
|
/* First 4 bytes of TOC are its header; and first 2 bytes of that indicate
|
|
the length */
|
|
+ g_seekable_seek(G_SEEKABLE(stream), 0, G_SEEK_SET, NULL, NULL);
|
|
if (g_input_stream_read(stream, &toc_len, sizeof(toc_len), NULL, NULL) != sizeof(toc_len)) {
|
|
g_set_error(error, MIRAGE_ERROR, MIRAGE_ERROR_CANNOT_HANDLE, "Parser cannot handle given image: failed to read 2-byte TOC length!");
|
|
return FALSE;
|
|
--
|
|
1.7.10.4
|
|
|