[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "realpath" loadable (in the examples/loadables dir) infinite loops
From: |
Eduardo A . Bustamante López |
Subject: |
Re: "realpath" loadable (in the examples/loadables dir) infinite loops |
Date: |
Mon, 19 Jun 2017 22:03:48 -0500 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Jun 19, 2017 at 07:18:11PM -0600, gazelle@xmission.com wrote:
[...]
> Description:
> Command "realpath --help" causes infinite loop.
I can reproduce this in the `devel' branch.
The getopts loop is missing a `return' to break out of it. This should
fix it:
diff --git a/examples/loadables/realpath.c b/examples/loadables/realpath.c
index b19b87fb..7ea9a995 100644
--- a/examples/loadables/realpath.c
+++ b/examples/loadables/realpath.c
@@ -88,6 +88,7 @@ WORD_LIST *list;
break;
default:
builtin_usage();
+ return (EX_USAGE);
}
}
--
Eduardo Bustamante
https://dualbus.me/