diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-04-08 06:06:01 -0700 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-04-08 06:06:01 -0700 |
commit | 662c3110803bd8c1aedacc36788e6fd028944314 (patch) | |
tree | 3ad8911a3721c0d944f613a29c69000f27d78a8f /udev | |
parent | 4b09a2fc4383f191d96a8d6134b95a4b84aef931 (diff) |
path_encode: fix max length calculation
Sebastian Krahmer wrote:
> it should reserve 4 times not 3 times len :)
Diffstat (limited to 'udev')
-rw-r--r-- | 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 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++) { |