Opened 13 years ago
Closed 13 years ago
#4841 closed defect (fixed)
struct AD should be deep copied
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | 0.21-fixes |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
In UDFMapICB the code makes a copy of a struct by doing a
*File = tmpmap.file;
And again:
tmpmap.file = *File;
C++ compilers will likely do the right thing. And even GNU gcc might do the right thing. But it is also possible that the copy won't happen right. In this case, if it got it wrong, then the Partition member of the struct could never get modified throughout the function and then it will be taken as fact that it was and used by this functions callers.
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | libs_libmythdvdnav_dvd_udf.c-deep-copy-ads.patch added |
---|
comment:1 Changed 13 years ago by
Milestone: | 0.21 → 0.22 |
---|
Note: See
TracTickets for help on using
tickets.
Does a deep copy of AD structs in UDFMapICB(), note - it is likely that a memcpy could be done too. I didn't to highlight my point. But it may be more efficient.