From 6965c8d80b28623bca6c29aa52453a1eeb13f681 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 20 Jun 2007 07:44:52 +0000 Subject: [PATCH] fix tar compatibility code in lar. If you just say "lar -b foo" lar crashes without this. Thanks to Patrick Mauritz for finding this. (trivial patch) Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@363 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- util/lar/lar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/lar/lar.c b/util/lar/lar.c index f3bfc24ee0..e138009a74 100644 --- a/util/lar/lar.c +++ b/util/lar/lar.c @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) // Right now, you'd have to write lar x -v instead of // lar xv... but the author of this software was too // lazy to handle all option parameter twice. - if (larmode == NONE) { + if (larmode == NONE && optind < argc) { if (strncmp(argv[optind], "x", 2) == 0) larmode = EXTRACT; else if (strncmp(argv[optind], "c", 2) == 0)