qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] readline: Fix possible array index out of bounds in readline


From: Stefan Hajnoczi
Subject: Re: [PATCH] readline: Fix possible array index out of bounds in readline_hist_add()
Date: Thu, 17 Dec 2020 09:47:35 +0000

On Thu, Dec 03, 2020 at 01:50:43PM +0000, Alex Chen wrote:
> When the 'cmdline' is the last entry in 'rs->history' array, there is
> no need to put this entry to the end of the array, partly because it is
> the last entry, and partly because the next operition will lead to array
> index out of bounds.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Alex Chen <alex.chen@huawei.com>
> ---
>  util/readline.c | 3 +++
>  1 file changed, 3 insertions(+)

Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]