[mythtv-commits] Ticket #9246: lirc handling code is branching based on uninitialized data

MythTV noreply at mythtv.org
Mon Jul 25 06:55:18 UTC 2011


#9246: lirc handling code is branching based on uninitialized data
------------------------------+----------------------------
 Reporter:  beirdo            |          Owner:  beirdo
     Type:  Bug Report        |         Status:  closed
 Priority:  minor             |      Milestone:  0.25
Component:  MythTV - General  |        Version:  Trunk Head
 Severity:  low               |     Resolution:  fixed
 Keywords:                    |  Ticket locked:  0
------------------------------+----------------------------
Changes (by Github):

 * status:  assigned => closed
 * resolution:   => fixed
 * milestone:  unknown => 0.25


Comment:

 Rework LIRC::GetCodes() to simplify buffer usage

 Fixes #9246

 This started as a fix for a valgrind-found branch based on uninitialized
 data.
 As I was in there trying to make it not be branching based on the last
 character after expanding the buffer, I simplified the algorithm as well.

 Now, we resize the buffer to hold 128 new bytes just before doing the
 read,
 and always read up to 128 bytes.  Instead of resizing after, I changed it
 to
 a truncate, and use takeLast() rather than back() and pop_back() on the
 returned list.
  Branch:    master
  Changeset: 83e3c5ebc475a28ece668111ec13dacf0d80fe1d

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9246#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list