From 04a0afe52852e6b6d6f81230b6d7acd25dac88dd Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 14 May 2018 16:12:18 +0200 Subject: 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 Message-Id: <20180514141218.28438-1-pbonzini@redhat.com> Reviewed-by: Markus Armbruster [Whitespace tweaked] Signed-off-by: Markus Armbruster --- scripts/coverity-model.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts/coverity-model.c') 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. * -- cgit v1.2.3