opnsense-src/bin/sh/tests/parameters
Jilles Tjoelker 7b9104c0a9 sh: Correctly handle positional parameters beyond INT_MAX on 64-bit systems.
Currently, there can be no more than INT_MAX positional parameters. Make
sure to treat all higher ones as unset to avoid incorrect results and
crashes.

On 64-bit systems, our atoi() takes the low 32 bits of the strtol() and
sign-extends them.

On 32-bit systems, the call to atoi() returned INT_MAX for too high values
and there is not enough address space for so many positional parameters, so
there was no issue.
2014-07-12 21:54:11 +00:00
..
env1.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
exitstatus1.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
mail1.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
mail2.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
Makefile sh: Correctly handle positional parameters beyond INT_MAX on 64-bit systems. 2014-07-12 21:54:11 +00:00
optind1.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
optind2.0 sh: Initialize OPTIND=1 even if it came from the environment. 2013-12-24 22:38:24 +00:00
positional1.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
positional2.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
positional3.0 sh: Add test for ${01} and ${010} that already works. 2014-07-08 22:04:44 +00:00
positional4.0 sh: Consistently treat ${01} like $1. 2014-07-12 10:27:30 +00:00
positional5.0 sh: Correctly handle positional parameters beyond INT_MAX on 64-bit systems. 2014-07-12 21:54:11 +00:00
pwd1.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00
pwd2.0 Migrate tools/regression/bin/ tests to the new layout. 2013-12-11 04:09:17 +00:00