[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] coverity-model: replay data is considered trusted
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH] coverity-model: replay data is considered trusted |
Date: |
Mon, 14 May 2018 16:12:18 +0200 |
Replay data is not considered a possible attack vector; add a model that
does not use getc so that "tainted data" warnings are suppressed.
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/coverity-model.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/scripts/coverity-model.c b/scripts/coverity-model.c
index c702804f41..576f48de33 100644
--- a/scripts/coverity-model.c
+++ b/scripts/coverity-model.c
@@ -103,6 +103,19 @@ static int get_keysym(const name2keysym_t *table,
}
}
+
+/* Replay data is considered trusted. */
+uint8_t replay_get_byte(void)
+{
+ uint8_t byte = 0;
+ if (replay_file) {
+ uint8_t c;
+ byte = c;
+ }
+ return byte;
+}
+
+
/*
* GLib memory allocation functions.
*
--
2.17.0
- [Qemu-devel] [PATCH] coverity-model: replay data is considered trusted,
Paolo Bonzini <=