From ed776413d171101f9c15f71ec813758d46c7376b Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 29 Jun 2010 13:12:48 +0200 Subject: [PATCH] buffer overflow in util_path_encode() Using only slashes or backslashes as a pathname it's theoretically possible to overflow the internal buffer. References: bnc#495586 Signed-off-by: Hannes Reinecke --- udev/lib/libudev-util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c index 7aea8c6..888347c 100644 --- a/udev/lib/libudev-util.c +++ b/udev/lib/libudev-util.c @@ -162,7 +162,7 @@ int util_log_priority(const char *priority) size_t util_path_encode(char *s, size_t len) { - char t[(len * 3)+1]; + char t[(len * 4)+1]; size_t i, j; t[0] = '\0'; -- 1.6.0.2