added a check to enforce a lower bound of 1 for j1,j2 Reference: /n/sources/patch/applied/join-arg-check Date: Wed Sep 13 17:45:42 CES 2006 Signed-off-by: skip@9netics.com --- /sys/src/cmd/join.c Wed Sep 13 17:44:37 2006 +++ /sys/src/cmd/join.c Wed Sep 13 17:44:35 2006 @@ -112,7 +112,7 @@ for (i = 0; i < no; i++) if (olist[i]-- > NFLD) /* 0 origin */ error("field number too big in -o",""); - if (argc != 3) + if (argc != 3 || j1 <= 0 || j2 <= 0) error("usage: join [-1 x -2 y] [-o list] file1 file2",""); j1--; j2--; /* everyone else believes in 0 origin */