summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/modules.py
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-06-05 20:05:51 +0300
committerKees Cook <keescook@chromium.org>2023-06-06 01:31:12 +0300
commit7afb6d8fa81fd8d332f70ead5e35d8c90abb8165 (patch)
treec843ef681c8a20274965d8c4482ee2e1ba9ef680 /scripts/gdb/linux/modules.py
parent8515e4a746fcb888fa6c320242eccf4c1d402465 (diff)
downloadlinux-7afb6d8fa81fd8d332f70ead5e35d8c90abb8165.tar.xz
jbd2: Avoid printing outside the boundary of the buffer
Theoretically possible that "%pg" will take all room for the j_devname and hence the "-%lu" will go outside the boundary due to unconditional sprintf() in use. To make this code more robust, replace two sequential s*printf():s by a single call and then replace forbidden character. It's possible to do this way, because '/' won't ever be in the result of "-%lu". Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20230605170553.7835-2-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions