Re: [PATCH 1/1] lib: parameter check in hash_calculate

2023-08-22 Thread Simon Glass
On Tue, 22 Aug 2023 at 02:43, Heinrich Schuchardt wrote: > > If hash_calculate is invoked with region_count = 0, it will try to hash > INT_MAX regions. We should check this parameter. > > * Avoid a comparison with different signedness. > * Check that region_count is at least 1. > * Avoid a superfl

[PATCH 1/1] lib: parameter check in hash_calculate

2023-08-22 Thread Heinrich Schuchardt
If hash_calculate is invoked with region_count = 0, it will try to hash INT_MAX regions. We should check this parameter. * Avoid a comparison with different signedness. * Check that region_count is at least 1. * Avoid a superfluous assignment. Fixes: b37b46f042cc ("rsa: Use checksum algorithms fr

[PATCH 1/1] lib: parameter check in hash_calculate

2023-08-22 Thread Heinrich Schuchardt
If hash_calculate is invoked with region_count = 0, it will try to hash INT_MAX regions. We should check this parameter. * Avoid a comparison with different signedness. * Check that region_count is at least 1. * Avoid a superfluous assignment. Fixes: b37b46f042cc ("rsa: Use checksum algorithms fr