Skip to content
Commit 6da11cc8 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Tom Rini
Browse files

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: 5294e978 ("stdio: extend "name" to 32 symbols")
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 6a1e0ae4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment