test_data->input_data_sz is passed to a parameter that
cannot be negative.
Coverity issue: 328504
Fixes:
b68a82425da4 ("app/compress-perf: add performance measurement")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
if (test_data->input_data_sz == 0)
test_data->input_data_sz = actual_file_sz;
- if (fseek(f, 0, SEEK_SET) != 0) {
+ if (test_data->input_data_sz <= 0 || actual_file_sz <= 0 ||
+ fseek(f, 0, SEEK_SET) != 0) {
RTE_LOG(ERR, USER1, "Size of input could not be calculated\n");
goto end;
}