Opened 16 years ago
Closed 15 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)
Changed 16 years ago by
Changed 16 years ago by
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 Changed 15 years ago by
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 ?
Changed 15 years ago by
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 Changed 15 years ago by
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!
Changed 15 years ago by
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 Changed 15 years ago by
Milestone: | unknown → 0.22 |
---|---|
Owner: | changed from Isaac Richards to Janne Grunau |
Status: | new → assigned |
comment:5 Changed 15 years ago by
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