[hackers] [sbase] Error out if a single argument cannot fit into the argument space || sin
commit e96144118e239e99070d7de79a980c777cfa36bc
Author: sin <sin_AT_2f30.org>
Date: Wed Jan 8 20:20:04 2014 +0000
Error out if a single argument cannot fit into the argument space
diff --git a/xargs.c b/xargs.c
index d18cb88..b0c43b5 100644
--- a/xargs.c
+++ b/xargs.c
_AT_@ -84,6 +84,8 @@ main(int argc, char *argv[])
while ((arg = poparg())) {
if (argsz + strlen(arg) + 1 > argmaxsz ||
i >= NARGS - 1) {
+ if (strlen(arg) + 1 > argmaxsz)
+ enprintf(EXIT_FAILURE, "insufficient argument space
");
pusharg(arg);
break;
}
Received on Wed Jan 08 2014 - 21:35:03 CET
This archive was generated by hypermail 2.3.0
: Wed Jan 08 2014 - 21:36:10 CET