zdtm: avoid arithmetic overflow in datagen and datachk
p + FAST_SIZE > buffer + length
In this sentence p + FAST_SIZE may be bigger than (1<<32),
and we will be in trouble.
$ gdb -c coredump test/zdtm/static/write_read01
(gdb) p p
$3 = (uint8_t *) 0xffffa89e
(gdb) p buffer
$4 = (uint8_t *) 0xfff06780
(gdb) p length
$5 = 1000000
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
Showing
Please
register
or
sign in
to comment