History

src/src_(linear|zoh).c : Fix for bug in zero_input_test(). Both these converters crashed if the input_frames field of SRC_DATA was zero.

Erik de Castro Lopo committed 17 years ago

Commit 6707f5c1 parent f2e38233 files · +10 −0Browse files

Unified · Split

3 files
  1. ChangeLog +4 −0
  2. src/src_linear.c +3 −0
  3. src/src_zoh.c +3 −0
ChangeLog+4−0
@@ -3,6 +3,10 @@ · 2 unmodified lines
33 * tests/misc_test.c
44 Add zero_input_test() from debian bug #506722.
55
6+ * src/src_linear.c src/src_zoh.c
7+ Fix for bug in zero_input_test(). Both these converters crashed if the
8+ input_frames field of SRC_DATA was zero.
9+
610 2009-09-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
711
812 * M4/endian.m4
src/src_linear.c+3−0
@@ -58,6 +58,9 @@ linear_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) · 57 unmodified lines
5858 double src_ratio, input_index, rem ;
5959 int ch ;
6060
61+ if (data->input_frames <= 0)
62+ return SRC_ERR_NO_ERROR ;
63+
6164 if (psrc->private_data == NULL)
6265 return SRC_ERR_NO_PRIVATE ;
6366
src/src_zoh.c+3−0
@@ -56,6 +56,9 @@ zoh_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) · 55 unmodified lines
5656 double src_ratio, input_index, rem ;
5757 int ch ;
5858
59+ if (data->input_frames <= 0)
60+ return SRC_ERR_NO_ERROR ;
61+
5962 if (psrc->private_data == NULL)
6063 return SRC_ERR_NO_PRIVATE ;
6164

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t