diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2021-04-13 20:23:14 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2021-05-20 18:47:19 +0900 |
commit | 6192674bed14c2f3aa307b8761377f322dc76c29 (patch) | |
tree | 93a541dc2923c5e74d0fdb2e321f5ecd6aa0639f /libkmod | |
parent | 4fc543f0c31acb29d9b2f951e79f4c997536b2c5 (diff) | |
download | kmod-6192674bed14c2f3aa307b8761377f322dc76c29.tar.gz kmod-6192674bed14c2f3aa307b8761377f322dc76c29.tar.bz2 kmod-6192674bed14c2f3aa307b8761377f322dc76c29.zip |
libkmod: fix an overflow with wrong modules.builtin.modinfo
Fix a possbile overflow with exact PATH_MAX length modname
in wrong modules.builtin.modinfo.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[sw0312.kim: cherry-pick mainline commit 1cab02ecf6ee]
Change-Id: I609585cc97d8abb30541b37d3dee0eda66029162
Diffstat (limited to 'libkmod')
-rw-r--r-- | libkmod/libkmod-builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkmod/libkmod-builtin.c b/libkmod/libkmod-builtin.c index fc9a376..a75a542 100644 --- a/libkmod/libkmod-builtin.c +++ b/libkmod/libkmod-builtin.c @@ -246,7 +246,7 @@ bool kmod_builtin_iter_get_modname(struct kmod_builtin_iter *iter, len = dot - line; - if (len > PATH_MAX) { + if (len >= PATH_MAX) { sv_errno = ENAMETOOLONG; goto fail; } |