[mythtv-commits] Ticket #4841: struct AD should be deep copied

MythTV mythtv at cvs.mythtv.org
Mon Mar 3 21:17:34 UTC 2008


#4841: struct AD should be deep copied
---------------------------------------------+------------------------------
 Reporter:  Erik Hovland <erik at hovland.org>  |       Owner:  ijr       
     Type:  defect                           |      Status:  new       
 Priority:  minor                            |   Milestone:  0.21      
Component:  mythtv                           |     Version:  0.21-fixes
 Severity:  low                              |     Mlocked:  0         
---------------------------------------------+------------------------------
 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.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4841>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list