Re: [dev] [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread Roberto E. Vargas Caballero
> I was thinking the same until I checked back on the ISO C11 specification and > - there's no strnlen function :D Yes, it is true, but take a look to strnlen(3): The strlen() and strnlen() functions conform to IEEE Std 1003.1-2008 (``POSIX.1''). ;). -- Roberto E. Vargas Caballero -

Re: [dev] [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread koneu
>> Isn't there strnlen() function? > > This was the same I was thinking before of reading this new version, > but it is not necessary now. I was thinking the same until I checked back on the ISO C11 specification and - there's no strnlen function :D ~koneu

Re: [dev] [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-09-23 Thread Roberto E. Vargas Caballero
On Sat, Sep 21, 2013 at 03:41:01PM +0200, Mark Edgar wrote: > This patch avoids a buffer overflow in kpress() if a key-mapped string > longer than 31 characters is given in config.h. It also changes the I think we should only check that the size of the string is the correct, with something like:

[dev] [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-09-21 Thread Mark Edgar
This patch avoids a buffer overflow in kpress() if a key-mapped string longer than 31 characters is given in config.h. It also changes the maximum allowable key-mapped string length to a (likely) more reasonable 16. -Mark key-str.patch Description: Binary data