summaryrefslogtreecommitdiff
path: root/libudev/libudev-queue.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-04-21 14:44:33 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-04-21 14:44:33 +0200
commit60067cc75ac7dd583beea584f87f2f6d3358f3c1 (patch)
tree79e2b1cc2ebc5d2f7a8c6b99a3b75cf72a4e3719 /libudev/libudev-queue.c
parente925018786d85fb3aed3b62a0a89309f9a7d5e4f (diff)
more readlink buffer size handling
Diffstat (limited to 'libudev/libudev-queue.c')
-rw-r--r--libudev/libudev-queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libudev/libudev-queue.c b/libudev/libudev-queue.c
index f06c9e8a7a..5a4a3dc095 100644
--- a/libudev/libudev-queue.c
+++ b/libudev/libudev-queue.c
@@ -488,7 +488,7 @@ struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev
s = syspath;
l = util_strpcpyl(&s, sizeof(syspath), udev_get_sys_path(udev_queue->udev), NULL);
len = readlinkat(dirfd(dir), dent->d_name, s, l);
- if (len < 0 || (size_t)len >= l)
+ if (len <= 0 || (size_t)len == l)
continue;
s[len] = '\0';
dbg(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name);