Re: [PATCH] locomo.c: convert strncpy(x, y, sizeof(x)) to strlcpy

From: H. Peter Anvin
Date: Thu Mar 06 2008 - 16:51:24 EST


Roel Kluin wrote:
This patch was not yet tested. Please confirm it's right.
---
strncpy does not append '\0' if the length of the source string equals
the size parameter, strlcpy does.


Are you sure it's safe to not zero out the contents of the buffer (no information leak)?

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/