qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 593621: readline: Fix possible array index ou


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 593621: readline: Fix possible array index out of bounds i...
Date: Mon, 04 Jan 2021 09:32:42 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 593621f36b716eb091c4ec791db72dd4461789da
      
https://github.com/qemu/qemu/commit/593621f36b716eb091c4ec791db72dd4461789da
  Author: Alex Chen <alex.chen@huawei.com>
  Date:   2021-01-04 (Mon, 04 Jan 2021)

  Changed paths:
    M util/readline.c

  Log Message:
  -----------
  readline: Fix possible array index out of bounds in readline_hist_add()

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>
Message-id: 20201203135043.117072-1-alex.chen@huawei.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: e551455f1e7a3d7eee9e11e2903e4050bc5511ae
      
https://github.com/qemu/qemu/commit/e551455f1e7a3d7eee9e11e2903e4050bc5511ae
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-04 (Mon, 04 Jan 2021)

  Changed paths:
    M util/readline.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/stefanha-gitlab/tags/block-pull-request' into staging

Pull request

# gpg: Signature made Mon 04 Jan 2021 14:22:58 GMT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha-gitlab/tags/block-pull-request:
  readline: Fix possible array index out of bounds in readline_hist_add()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/41192db33858...e551455f1e7a



reply via email to

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