> 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
-
>> 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
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:
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