From 662c3110803bd8c1aedacc36788e6fd028944314 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 8 Apr 2009 06:06:01 -0700 Subject: [PATCH] path_encode: fix max length calculation Sebastian Krahmer wrote: > it should reserve 4 times not 3 times len :) --- udev/lib/libudev-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c index b628fdd4..a40be067 100644 --- a/udev/lib/libudev-util.c +++ b/udev/lib/libudev-util.c @@ -103,7 +103,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; for (i = 0, j = 0; s[i] != '\0'; i++) { -- 2.39.5