ide: remove undefined behavior in ide-test
trivial: initialize the dirty buffer with a random-ish byte. Stops valgrind from whining about uninitialized buffers. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
25ac5bbec4
commit
6048018ef6
@ -544,6 +544,7 @@ static void make_dirty(uint8_t device)
|
||||
|
||||
guest_buf = guest_alloc(guest_malloc, len);
|
||||
buf = g_malloc(len);
|
||||
memset(buf, rand() % 255 + 1, len);
|
||||
g_assert(guest_buf);
|
||||
g_assert(buf);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user