summaryrefslogtreecommitdiff
blob: 58bc1f9327e670e66494be19a25484ee99c802cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
https://bugs.gentoo.org/show_bug.cgi?id=424527
https://savannah.gnu.org/bugs/index.php?36770

=== modified file 'grub-core/lib/xzembed/xz_dec_stream.c'
--- grub-core/lib/xzembed/xz_dec_stream.c	2012-02-29 13:56:51 +0000
+++ grub-core/lib/xzembed/xz_dec_stream.c	2012-07-22 14:27:03 +0000
@@ -403,18 +403,25 @@
 	}
 #endif
 
-	do {
+	if (b->in_pos == b->in_size)
+		return XZ_OK;
+
+	if (!crc32 && s->hash_size == 0)
+		s->pos += 8;
+
+	while (s->pos < (crc32 ? 32 : s->hash_size * 8)) {
 		if (b->in_pos == b->in_size)
 			return XZ_OK;
 
 #ifndef GRUB_EMBED_DECOMPRESSOR
-		if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos++])
+		if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos])
 			return XZ_DATA_ERROR;
 #endif
+		b->in_pos++;
 
 		s->pos += 8;
 
-	} while (s->pos < (crc32 ? 32 : s->hash_size * 8));
+	}
 
 #ifndef GRUB_EMBED_DECOMPRESSOR
 	if (s->hash)
@@ -529,8 +536,6 @@
 			s->hash->init(s->index.hash.hash_context);
  			s->hash->init(s->block.hash.hash_context);
 		}
-		if (!s->hash)
-			return XZ_OPTIONS_ERROR;
 #endif
 	}
 	else

=== modified file 'grub-core/normal/autofs.c'
--- grub-core/normal/autofs.c	2012-05-01 13:26:36 +0000
+++ grub-core/normal/autofs.c	2012-07-22 14:23:46 +0000
@@ -32,11 +32,21 @@
 autoload_fs_module (void)
 {
   grub_named_list_t p;
+  int ret = 0;
+  grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX];
+
+  grub_memcpy (grub_file_filters_was, grub_file_filters_enabled,
+	       sizeof (grub_file_filters_enabled));
+  grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
+	       sizeof (grub_file_filters_enabled));
 
   while ((p = fs_module_list) != NULL)
     {
       if (! grub_dl_get (p->name) && grub_dl_load (p->name))
-	return 1;
+	{
+	  ret = 1;
+	  break;
+	}
 
       if (grub_errno)
 	grub_print_error ();
@@ -46,7 +56,10 @@
       grub_free (p);
     }
 
-  return 0;
+  grub_memcpy (grub_file_filters_enabled, grub_file_filters_was,
+	       sizeof (grub_file_filters_enabled));
+
+  return ret;
 }
 
 /* Read the file fs.lst for auto-loading.  */