aboutsummaryrefslogtreecommitdiff
path: root/scripts/coverity-model.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2018-05-14 16:12:18 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-06-13 13:47:35 +0200
commit04a0afe52852e6b6d6f81230b6d7acd25dac88dd (patch)
tree7ff4e004dde8f3fccf4bfd6ed88d4417ce059096 /scripts/coverity-model.c
parent717ea844a7640cf0c9d7713ce2f00ee091d4a01f (diff)
coverity-model: replay data is considered trusted
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 <pbonzini@redhat.com> Message-Id: <20180514141218.28438-1-pbonzini@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Whitespace tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/coverity-model.c')
-rw-r--r--scripts/coverity-model.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/coverity-model.c b/scripts/coverity-model.c
index c702804f41..48b112393b 100644
--- a/scripts/coverity-model.c
+++ b/scripts/coverity-model.c
@@ -103,6 +103,18 @@ 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.
*