[Sumover-dev] [Media Tools] #56: Rat crash on erroneous errno check

Media Tools SUMOVER-dev at cs.ucl.ac.uk
Fri Feb 9 17:27:28 GMT 2007


#56: Rat crash on erroneous errno check
--------------------+-------------------------------------------------------
 Reporter:  piers   |       Owner:  socrates
     Type:  defect  |      Status:  new     
 Priority:  major   |   Milestone:          
Component:  rat     |     Version:  4.3.00  
 Keywords:          |  
--------------------+-------------------------------------------------------
 Rat was crashing  due to the following check for errno  in
 [http://mediatools.cs.ucl.ac.uk/nets/mmedia/browser/common/trunk/src/mbus_parser.c#L170
 mbus_parser.c]. However all use of errno should be prefixed with setting
 it zero as errno is not reset after a successful return from a function.
 In this case a ERANGE was occurring elsewhere (in tcl code
 mbus_recv_rtp.source.cname() in ui_audiotool.tcl - not actually a problem
 because an 'int' compare drops thru to a 'string' compare).

 Also note that errno is a global variable in single threaded mode. In
 multithreaded mode errno is #defined to function that returns the vcalue
 for the current thread (in Windows this enabled when Multithreaded
 libraries are selected, in Linux _REENTRANT needs to be defined).

-- 
Ticket URL: <https://mediatools.cs.ucl.ac.uk/nets/mmedia/ticket/56>
Media Tools <http://www-mice.cs.ucl.ac.uk/multimedia/software>
Media Tools


More information about the Sumover-dev mailing list