[mythtv-commits] Ticket #4837: check of shm_img pointer in ChromaKeyOSD::AllocImage() should be done before shm_img is dereferenced

MythTV mythtv at cvs.mythtv.org
Mon Mar 3 20:51:41 UTC 2008


#4837: check of shm_img pointer in ChromaKeyOSD::AllocImage() should be done
before shm_img is dereferenced
---------------------------------------------+------------------------------
 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         
---------------------------------------------+------------------------------
 shm_img is dereferenced before it is checked:
 {{{
     uint size = shm_img->bytes_per_line * (shm_img->height+1) + 128;
     X11U;

     if (shm_img)
 }}}

 Which means the caller of this member function will segfault if the shm
 call didn't work.

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


More information about the mythtv-commits mailing list