Skip to content

Commit

Permalink
busybox expr-applet:
Browse files Browse the repository at this point in the history
 * ignore double-dashes as suggested by [http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html POSIX specification, Guideline 10]
 * this is a bit modified version of [Freetz#18 pull request Freetz#18]
 * closes Freetz#18


git-svn-id: http://svn.freetz.org/trunk@14457 f5190166-0702-4917-9039-51ec32eddaf5
  • Loading branch information
er13 committed Oct 15, 2017
1 parent 495e2ca commit f7d6aec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions make/busybox/patches/903-expr_double_dashes.freetz.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- coreutils/expr.c
+++ coreutils/expr.c
@@ -542,6 +542,9 @@

xfunc_error_retval = 2; /* coreutils compat */
G.args = argv + 1;
+ if (nextarg("--")) {
+ G.args++;
+ }
if (*G.args == NULL) {
bb_error_msg_and_die("too few arguments");
}

0 comments on commit f7d6aec

Please sign in to comment.