chiark
/
gitweb
/
~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f06fa5
)
dvd-sector-copy.c: Reinterpret the `step' as being beyond the high bound.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 6 Mar 2022 00:58:20 +0000
(
00:58
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 6 Mar 2022 00:58:20 +0000
(
00:58
+0000)
dvd-sector-copy.c
patch
|
blob
|
blame
|
history
diff --git
a/dvd-sector-copy.c
b/dvd-sector-copy.c
index f757e496a9a13fcebcde0afebb8c02464f18d52e..bed3cf62d1f4716f35f72ddf871a808613dc6928 100644
(file)
--- a/
dvd-sector-copy.c
+++ b/
dvd-sector-copy.c
@@
-736,11
+736,11
@@
static ssize_t find_good_sector(secaddr *pos_inout, secaddr end,
recovered(bad_lo, end); *pos_inout = end;
return (0);
}
recovered(bad_lo, end); *pos_inout = end;
return (0);
}
- step =
step_factor
*(bad_hi - bad_lo);
+ step =
(step_factor - 1)
*(bad_hi - bad_lo);
if (step < step_min) step = step_min;
if (step_max && step > step_max) step = step_max;
if (step < step_min) step = step_min;
if (step_max && step > step_max) step = step_max;
- if (step > end - bad_
lo) step = end - bad_lo
;
- pos = bad_
lo
+ step - 1;
+ if (step > end - bad_
hi) step = end - bad_hi
;
+ pos = bad_
hi
+ step - 1;
want = run_length_wanted(pos, step, end);
n = recovery_read(&r, pos, want);
#ifdef DEBUG
want = run_length_wanted(pos, step, end);
n = recovery_read(&r, pos, want);
#ifdef DEBUG