]> code.delx.au - refind/commitdiff
Fixed bug that caused ASSERT error on some systems if
authorsrs5694 <srs5694@users.sourceforge.net>
Wed, 23 Jan 2013 21:09:41 +0000 (16:09 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Wed, 23 Jan 2013 21:09:41 +0000 (16:09 -0500)
default_selection was not set.

NEWS.txt
docs/refind/getting.html
refind.spec
refind/main.c

index 91267ca08856fde78211f23796aecb7006927d8a..d3c870c94653ec16694b3a115fbc3c70584a6e3f 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,10 @@
 0.6.6 (?/??/2013):
 ------------------
 
+- Fixed bug that caused ASSERT error on some systems (and conceivably a
+  crash on startup on some) when default_selection line in refind.conf was
+  commented out or empty.
+
 - Fixed bug that caused "Binary is whitelisted" message to persist on
   screen after loading MOK-signed drivers in Secure Boot mode.
 
index 4ad26b0c1aa090c04ec00136b1d0429dfd13d2d5..bf803e73b8942cefaf5056d8bed4bcfa97b352dd 100644 (file)
@@ -216,12 +216,13 @@ computer.</p>
     Tianocore toolkit, and so support booting BIOS/legacy boot loaders on
     UEFI-based PCs.</li>
 
-<li><b>ALT Linux</b>&mdash;This RPM-based distribution is experimenting
-    with using rEFInd on EFI-based computers. As I write, the ALT
-    developers haven't yet nailed down booting from an optical disc (it's a
-    tricky and delicate task, especially when preparing a "hybrid" image),
-    but they're working on the problem. They have an RPM of rEFInd, but I
-    don't have a download link.</li>
+<li><b>ALT Linux</b>&mdash;This RPM-based distribution is experimenting with
+    using rEFInd on EFI-based computers. As I write, the ALT developers haven't
+    yet nailed down booting from an optical disc (it's a tricky and delicate
+    task, especially when preparing a "hybrid" image), but they're working on
+    the problem. They have an RPM of rEFInd; see <a
+    href="http://packages.altlinux.org/en/Sisyphus/srpms/refind">this page</a>
+    for details.</li>
 
 <li><b><a href="http://distro.ibiblio.org/fatdog/web/">Fat
     Dog</a></b>&mdash;This variant of Puppy Linux uses a combination of
index c61081af8154b47baaafff2cda3b198eaaf67d40..3c30d476c7d75068b92aea91b7661894349548c7 100644 (file)
@@ -1,6 +1,6 @@
 Summary: EFI boot manager software
 Name: refind
-Version: 0.6.5
+Version: 0.6.5.4
 Release: 1%{?dist}
 Summary: EFI boot manager software
 License: GPLv3
index b9a8e1889f1903d230f0bbc4934c25b04af40dd7..10349272587df1a6324e177cedfd9e130e367675 100644 (file)
@@ -128,7 +128,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.5.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.5.4");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -604,12 +604,12 @@ VOID GenerateSubScreen(LOADER_ENTRY *Entry, IN REFIT_VOLUME *Volume) {
          // earlier....
          if ((SubScreen->Entries != NULL) && (SubScreen->Entries[0] != NULL)) {
             MyFreePool(SubScreen->Entries[0]->Title);
-            SubScreen->Entries[0]->Title = StrDuplicate(TokenList[0]);
+            SubScreen->Entries[0]->Title = TokenList[0] ? StrDuplicate(TokenList[0]) : StrDuplicate(L"Boot Linux");
          } // if
          FreeTokenLine(&TokenList, &TokenCount);
          while ((TokenCount = ReadTokenLine(File, &TokenList)) > 1) {
             SubEntry = InitializeLoaderEntry(Entry);
-            SubEntry->me.Title = StrDuplicate(TokenList[0]);
+            SubEntry->me.Title = TokenList[0] ? StrDuplicate(TokenList[0]) : StrDuplicate(L"Boot Linux");
             MyFreePool(SubEntry->LoadOptions);
             SubEntry->LoadOptions = AddInitrdToOptions(TokenList[1], InitrdName);
             FreeTokenLine(&TokenList, &TokenCount);
@@ -1921,7 +1921,7 @@ static VOID ScanForTools(VOID) {
             } // while
             if (FileExists(SelfDir, L"MokManager.efi")) {
                MyFreePool(FileName);
-               FileName = StrDuplicate(SelfDirPath);
+               FileName = SelfDirPath ? StrDuplicate(SelfDirPath) : NULL;
                MergeStrings(&FileName, L"\\MokManager.efi", 0);
                SPrint(Description, 255, L"MOK Key Manager at %s", FileName);
                AddToolEntry(SelfLoadedImage->DeviceHandle, FileName, Description,
@@ -2018,7 +2018,7 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
     BOOLEAN            MokProtocol;
     REFIT_MENU_ENTRY   *ChosenEntry;
     UINTN              MenuExit, i;
-    CHAR16             *Selection;
+    CHAR16             *Selection = NULL;
     EG_PIXEL           BGColor;
 
     // bootstrap
@@ -2061,7 +2061,9 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
        RescanAll();
     } // if
 
-    Selection = StrDuplicate(GlobalConfig.DefaultSelection);
+    if (GlobalConfig.DefaultSelection)
+       Selection = StrDuplicate(GlobalConfig.DefaultSelection);
+
     while (MainLoopRunning) {
         MenuExit = RunMainMenu(&MainMenu, Selection, &ChosenEntry);