commit | ab613b56a1ac4883e12faec71d3eec9c5c44e4f0 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@chromium.org> | Mon Oct 17 13:10:22 2022 +0900 |
committer | crosvm LUCI <crosvm-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Oct 17 04:31:17 2022 +0000 |
tree | ae2e448add41308d47e73d70468787d9ba5a15e2 | |
parent | 894670a919d49a826c5c70fae386569819371067 [diff] |
video: decoder: vda: use wrapping multiplication for timestamp When decoding using libvda, the frame timestamp is truncated to 32-bits and needs to be restored to its original value. This is done by doing a multiplication with the truncation factor. However, if libvda gives us an invalid timestamp, the multiplication can overflow and cause the video device process to panic. Avoid this by switching to a wrapping multiplication - the passed timestamp will still be invalid, but the decoder device will signal an error instead of crashing. BUG=None TEST=cargo build --features "video-decoder,libvda" Change-Id: Iabe683a997e0e9dea8c2bea53ef520f53868e590 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3958881 Reviewed-by: David Stevens <stevensd@chromium.org> Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.