Re: [PATCH] ksh getint cleanup

2015-09-10 Thread Martijn van Duren
ping On 09/04/15 08:50, Martijn van Duren wrote: Here's a slightly updated patch which makes sure that 0x0x isn't possible On 09/03/15 21:59, Martijn van Duren wrote: Hello tech@, I gave a look to getint in var.c, which turned out to roll out it's own version of string to long conversion, wit

Re: [PATCH] ksh getint cleanup

2015-09-03 Thread Martijn van Duren
Here's a slightly updated patch which makes sure that 0x0x isn't possible On 09/03/15 21:59, Martijn van Duren wrote: Hello tech@, I gave a look to getint in var.c, which turned out to roll out it's own version of string to long conversion, without overflow checking. Attached is a diff to mak

[PATCH] ksh getint cleanup

2015-09-03 Thread Martijn van Duren
Hello tech@, I gave a look to getint in var.c, which turned out to roll out it's own version of string to long conversion, without overflow checking. Attached is a diff to make the function more readable and overflow safe by using strtol, with error checking based on strtonum. I choose for