summaryrefslogtreecommitdiff
path: root/udev/lib
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-04-08 06:06:01 -0700
committerKay Sievers <kay.sievers@vrfy.org>2009-04-08 06:06:01 -0700
commit662c3110803bd8c1aedacc36788e6fd028944314 (patch)
tree3ad8911a3721c0d944f613a29c69000f27d78a8f /udev/lib
parent4b09a2fc4383f191d96a8d6134b95a4b84aef931 (diff)
path_encode: fix max length calculation
Sebastian Krahmer wrote: > it should reserve 4 times not 3 times len :)
Diffstat (limited to 'udev/lib')
-rw-r--r--udev/lib/libudev-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c
index b628fdd44c..a40be06757 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++) {