Opened 18 years ago
Closed 16 years ago
#5150 closed defect (invalid)
save_read can return -1 or differing save count when called
| Reported by: | Owned by: | Janne Grunau | |
|---|---|---|---|
| Priority: | trivial | Milestone: | 0.22 |
| Component: | mythtv | Version: | head |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
save_read can return -1 or a different saved count of bytes when called. That means callers of it should check to make sure it worked. There are two calls in mythtranscode of this function.
Attachments (4)
Change History (9)
by , 18 years ago
by , 18 years ago
| Attachment: | programs_mythtranscode_replex_replex.c-check-save_read-count-in-replex_fill_buffers.patch added |
|---|
check save_read for errors and report
comment:1 by , 17 years ago
| Status: | new → infoneeded_new |
|---|
Erik, we do not like to call exit() or abort() from deep within the application, can you rework the patch so that the error condition is passed up to main.cpp ?
by , 17 years ago
| Attachment: | programs_mythtranscode_replex_replex.c-check-save_read-count-in-replex_fill_buffers-ticket-5150.patch added |
|---|
update the patch to return instead of perror
comment:3 by , 17 years ago
| Status: | infoneeded_new → new |
|---|
Gah! perror is fine where we are not using the VERBOSE macro. It's the original code that is stewn with exit() calls and you removed one in your patch. 34 just in that file, yikes!
by , 17 years ago
| Attachment: | programs_mythtranscode_replex_replex.c-check-save_read-count-in-replex_fill_buffers-ticket-5150.2.patch added |
|---|
Fresh patch for old ticket.
comment:4 by , 16 years ago
| Milestone: | unknown → 0.22 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:5 by , 16 years ago
| Resolution: | → invalid |
|---|---|
| Status: | assigned → closed |
there are ATM only two locations which check only that save_read is non negative.
Both read from the start of the file so it's sane to assume that the read either fail or are complete. The patches in this ticket change different parts of the file,
Since it's imported code we shouldn't not change too much like replacing all perror/exit with proper error handling.

check save_read for errors and report