From: Paolo Bonzini Date: Mon, 14 May 2018 14:12:18 +0000 (+0200) Subject: coverity-model: replay data is considered trusted X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=04a0afe52852e6b6d6f81230b6d7acd25dac88dd;p=qmiga%2Fqemu.git 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 --- 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. *