-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QATAPP-28529: fix overflow on large files
If the input is a large file and we allocate memory via malloc, we can cause an overflow when computing the comp_out_sz and decomp_out_sz (lines 4247 and 4250): test_arg[i].comp_out_sz = test_arg[i].src_sz * 2; test_arg[i].decomp_out_sz = test_arg[i].src_sz * 5; This would cause the associated mallocs to fail with ENOMEM. Fix this by using size_t. Also fix many other places where the variables from test_arg are copied into other variables. Change-Id: I18b6f55b41bd5a85ee0bb2c0bbb647e3775fe429 Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
- Loading branch information
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters