14 Apr
2020
14 Apr
'20
5:01 a.m.
I believe there is a bug in rtl_sdr.c at lines 89 and 242. When bytes_to_read == len (or n_read), then bytes_to_read becomes 0 at lines 101 and 258 and the read never terminates since 0 means infinite read. I believe the fix is to change lines 89 and 242 to read: if ((bytes_to_read > 0) && (bytes_to_read <= len)) { // Versus bytes_to_read < len if ((bytes_to_read > 0) && (bytes_to_read <= (uint32_t)n_read)) { // Likewise John Tiller