Browse Source

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

1.4.2
Thomas Schmitt 7 years ago
parent
commit
7993b719a7
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 3
      libburn/mmc.c

2
cdrskin/cdrskin_timestamp.h

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

3
libburn/mmc.c

@ -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);

Loading…
Cancel
Save