crosvm/rutabaga_gfx
Phillip Pearson 1675e32f36 virgl_renderer: Fix incorrect usage of CString
Calling CString::into_raw, changing the length of the string, then
passing it to CString::from_raw is not allowed:
https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_raw

This uses a vector instead, and truncates it to the length reported by
vsnprintf.

BUG=b:209867862
TEST=Borealis boots, and accelerated graphics work.

Change-Id: I4b08eabda74086819b3fb437247a5f2ef962defe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3324614
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Phillip Pearson <philpearson@google.com>
2021-12-16 21:58:33 +00:00
..
ffi rutabaga_gfx: prepare for VIRGL_RENDERER_MULTI_PROCESS 2021-12-09 20:16:07 +00:00
src virgl_renderer: Fix incorrect usage of CString 2021-12-16 21:58:33 +00:00
build.rs rutabaga_gfx: silence warnings when not building virgl_renderer 2021-11-12 21:44:18 +00:00
Cargo.toml Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00