diff options
Diffstat (limited to 'udevinfo.c')
-rw-r--r-- | udevinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/udevinfo.c b/udevinfo.c index d0b1c447f4..be9aa769e1 100644 --- a/udevinfo.c +++ b/udevinfo.c @@ -79,6 +79,8 @@ static void print_all_attributes(const char *devpath, const char *key) if (attr_value == NULL) continue; len = strlcpy(value, attr_value, sizeof(value)); + if(len >= sizeof(value)) + len = sizeof(value) - 1; dbg("attr '%s'='%s'(%zi)", dent->d_name, value, len); /* remove trailing newlines */ |