From 7eeceb5e7dfa81bef3e22d02666cc926da3b310a Mon Sep 17 00:00:00 2001 From: Tim Mann Date: Sun, 31 Mar 2024 18:29:24 -0700 Subject: [PATCH] Fix bug with wraparound detection when the duplicate ID block gets cut off by the DMK buffer filling up. The fix is to stop decoding when the buffer fills up, so that we don't detect such a header in the first place. --- ChangeLog | 5 +++++ cw2dmk.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6810c5a..1977294 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +* Fix bug with wraparound detection when the duplicate ID block gets + cut off by the DMK buffer filling up. The fix is to stop decoding + when the buffer fills up, so that we don't detect such a header in + the first place. + 4.10.0 -- Mon Mar 11 19:30:33 UTC 2024 -- Tim Mann, Quentin Barnes * Add -S option. This option allows the user to specify a minimum diff --git a/cw2dmk.c b/cw2dmk.c index b90e3b0..f3cd362 100644 --- a/cw2dmk.c +++ b/cw2dmk.c @@ -852,6 +852,7 @@ process_bit(int bit) unsigned char val = 0; int i; + if (dmk_full) return; accum = (accum << 1) + bit; taccum = (taccum << 1) + bit; bits++;