mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
firehose: Prevent potential overflow in info print
also fixes the improper format specifier i suppose CodeQL reports: Multiplication result may overflow 'unsigned int' before it is converted to 'long'. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
b1ec56fc9e
commit
aeb70e0645
@@ -417,9 +417,9 @@ static int firehose_program(struct qdl_device *qdl, struct program *program, int
|
||||
fprintf(stderr, "[PROGRAM] failed\n");
|
||||
} else if (t) {
|
||||
fprintf(stderr,
|
||||
"[PROGRAM] flashed \"%s\" successfully at %ldkB/s\n",
|
||||
"[PROGRAM] flashed \"%s\" successfully at %lukB/s\n",
|
||||
program->label,
|
||||
program->sector_size * num_sectors / t / 1024);
|
||||
(unsigned long)program->sector_size * num_sectors / t / 1024);
|
||||
} else {
|
||||
fprintf(stderr, "[PROGRAM] flashed \"%s\" successfully\n",
|
||||
program->label);
|
||||
|
||||
Reference in New Issue
Block a user