diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-09-29 02:47:17 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-09 15:24:31 -0400 |
commit | 6da11cc81ea773d9a1e3059da311c6f2e2aeb6ef (patch) | |
tree | f263b4f7a655ae63af68784be4dd834858a8095c /lib/membuff.c | |
parent | 6a1e0ae43e2108a88e022103b3b303c9f4964a64 (diff) |
stdio: fix stdio_deregister_dev()
When copying the name of a stdio device we must ensure that it is NUL
terminated before passing it to strcmp() to avoid a buffer overrun.
Truncating the name field leads to failure to deregister a stdio device.
When copying we must ensure that the name field sizes match.
Addresses-Coverity-ID: 350462 String not null terminated
Fixes: 5294e97832a6 ("stdio: extend "name" to 32 symbols")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/membuff.c')
0 files changed, 0 insertions, 0 deletions