Preventing very improbable signed 32 bit overflow with MMC speed range. Coverity CID 21823.

This commit is contained in:
Thomas Schmitt 2015-10-26 15:45:19 +00:00
parent 98a6284402
commit 7993b719a7
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2015.10.26.153745"
#define Cdrskin_timestamP "2015.10.26.154728"

View File

@ -4365,7 +4365,8 @@ static int interpret_performance(struct burn_drive *d, struct command *c,
for (b = 0; b < 4 ; b++) {
start_speed += pd[8 + i*16 + 4 + b]
<< (24 - 8 * b);
end_lba += pd[8 + i*16 + 8 + b]
end_lba += ((unsigned long int)
pd[8 + i*16 + 8 + b])
<< (24 - 8 * b);
read_speed += pd[8 + i*16 + 12 + b]
<< (24 - 8 * b);