init_index does a magic 12 byte call to save_read but doesn't check to see if it worked.
From: Erik Hovland <erik@hovland.org>
It really should.
---
programs/mythtranscode/replex/replex.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/programs/mythtranscode/replex/replex.c b/programs/mythtranscode/replex/replex.c
index 13b5d50..dfea4e6 100644
|
a
|
b
|
void init_replex(struct replex *rx)
|
| 1835 | 1835 | avi_context *ac; |
| 1836 | 1836 | uint8_t buf[AVI_S]; |
| 1837 | 1837 | int re=0; |
| | 1838 | ssize_t read_count = 0; |
| 1838 | 1839 | |
| 1839 | 1840 | lseek(rx->fd_in, 0, SEEK_SET); |
| 1840 | 1841 | ac = &rx->ac; |
| 1841 | 1842 | memset(ac, 0, sizeof(avi_context)); |
| 1842 | | save_read(rx, buf, 12); |
| | 1843 | if ((read_count = save_read(rx, buf, 12)) != 12) { |
| | 1844 | fprintf(stderr, |
| | 1845 | "Error reading in 12 bytes from replex. Read %d bytes\n", |
| | 1846 | read_count); |
| | 1847 | exit(1); |
| | 1848 | } |
| 1843 | 1849 | |
| 1844 | 1850 | if (check_riff(ac, buf, 12) < 0){ |
| 1845 | 1851 | fprintf(stderr, "Wrong RIFF header\n"); |