aboutsummaryrefslogtreecommitdiff
path: root/tests/ac97-test.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-02-10 16:28:23 +0000
committerMax Reitz <mreitz@redhat.com>2017-02-12 00:53:31 +0100
commit8b3c67922851bee9d5420373bfea010d3648bbc4 (patch)
tree594a28cda91b7f2f176ab48264bc7a3a2293a995 /tests/ac97-test.c
parent3026c4688ca80d9c5cc1606368c4a1009a6f507d (diff)
qemu-img: Use qemu_strtoul() rather than raw strtoul()
Some of the argument parsing in qemu-img uses strtoul() to parse integer arguments. This is tricky to get correct and in fact the code does not get it right, because it assigns the result of strtoul() to an 'int' variable and then tries to check for > INT_MAX. Coverity correctly complains that the comparison is always false. Rewrite to use qemu_strtoul(), which has a saner convention for reporting conversion failures. (Fixes CID 1356421, CID 1356422, CID 1356423.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1486744104-15590-2-git-send-email-peter.maydell@linaro.org Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/ac97-test.c')
0 files changed, 0 insertions, 0 deletions