[Mesa-dev] [PATCH] util: use strnlen() in strndup() implementations

2015-09-29 Thread Samuel Iglesias Gonsalvez
If the string being copied is not NULL-terminated the result of strlen() is undefined. Signed-off-by: Samuel Iglesias Gonsalvez --- src/util/ralloc.c | 5 + src/util/strndup.c | 6 ++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/util/ralloc.c

Re: [Mesa-dev] [PATCH] util: use strnlen() in strndup() implementations

2015-09-29 Thread Neil Roberts
Looks good to me. Thanks for doing that. Reviewed-by: Neil Roberts - Neil Samuel Iglesias Gonsalvez writes: > If the string being copied is not NULL-terminated the result of > strlen() is undefined. > > Signed-off-by: Samuel Iglesias Gonsalvez

Re: [Mesa-dev] [PATCH] util: use strnlen() in strndup() implementations

2015-09-29 Thread Jose Fonseca
On 29/09/15 15:35, Samuel Iglesias Gonsalvez wrote: If the string being copied is not NULL-terminated the result of strlen() is undefined. Signed-off-by: Samuel Iglesias Gonsalvez --- src/util/ralloc.c | 5 + src/util/strndup.c | 6 ++ 2 files changed, 3