]> git.ozlabs.org Git - yaboot.git/commitdiff
long append="..." causes yaboot to reject entire yaboot.conf (MAX_TOKEN too small) 1.3.15-merge yaboot-1.3.15-rc
authorWill Woods <wwoods@redhat.com>
Thu, 13 Nov 2008 00:59:43 +0000 (00:59 +0000)
committerTony Breeds <tony@bakeyournoodle.com>
Tue, 17 Feb 2009 22:59:52 +0000 (09:59 +1100)
yaboot's second/cfg.c has:
  #define MAX_TOKEN 200

When yaboot parses its config file, if it encounters a quoted string (like
append="...") longer than MAX_TOKEN, it rejects the entire config.

Typical preupgrade usage uses ~250 chars, which means preupgrade currently
renders ppc systems unbootable without this patch.

Suggest increasing MAX_TOKEN to.. let's say 511. cfg.c does "char
buf[MAX_TOKEN+1]", and everyone loves powers of 2.

Signed-off-by: Roman Rakus <rrakus@redhat.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
second/cfg.c

index fe3f1e1b40d8c78ed4d8d396d42792582ff63904..f23e690d4807ad0b37da58d91b9ae589d879ffa3 100644 (file)
@@ -41,7 +41,7 @@ typedef struct {
      void *data;
 } CONFIG;
 
-#define MAX_TOKEN 200
+#define MAX_TOKEN 511
 #define MAX_VAR_NAME MAX_TOKEN
 #define EOF -1