Skip to content
This repository
Browse code

pvr: Fix missing field initialization CPVRChannelGroup contructor

The method ResetChannelNumberCache reads the field m_bSelectedGroup before it
is initialized. The field needs to be initialized in the constructor.

Conditional jump or move depends on uninitialised value(s)
  in PVR::CPVRChannelGroup::ResetChannelNumberCache() in xbmc/pvr/channels/PVRChannelGroup.cpp:921
  1: PVR::CPVRChannelGroup::ResetChannelNumberCache() in xbmc/pvr/channels/PVRChannelGroup.cpp:921
  2: PVR::CPVRChannelGroup::Renumber() in xbmc/pvr/channels/PVRChannelGroup.cpp:913
  3: PVR::CPVRChannelGroupInternal::Renumber() in xbmc/pvr/channels/PVRChannelGroupInternal.cpp:253
  4: PVR::CPVRChannelGroup::SortAndRenumber() in xbmc/pvr/channels/PVRChannelGroup.cpp:316
  5: PVR::CPVRChannelGroup::Load() in xbmc/pvr/channels/PVRChannelGroup.cpp:139
  6: PVR::CPVRChannelGroupInternal::Load() in xbmc/pvr/channels/PVRChannelGroupInternal.cpp:60
  7: PVR::CPVRChannelGroups::Load() in xbmc/pvr/channels/PVRChannelGroups.cpp:282
  8: PVR::CPVRChannelGroupsContainer::Load() in xbmc/pvr/channels/PVRChannelGroupsContainer.cpp:69
  9: PVR::CPVRManager::Load() in xbmc/pvr/PVRManager.cpp:542
  10: PVR::CPVRManager::Process() in xbmc/pvr/PVRManager.cpp:406
  11: CThread::Action() in xbmc/threads/Thread.cpp:220
  12: CThread::staticThread(void*) in xbmc/threads/Thread.cpp:130
  13: start_thread in /build/buildd/eglibc-2.17/nptl/pthread_create.c:311
  14: clone in /build/buildd/eglibc-2.17/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Uninitialised value was created by a heap allocation  1: operator new(unsigned long) in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
  2: PVR::CPVRChannelGroups::Load() in xbmc/pvr/channels/PVRChannelGroups.cpp:280
  3: PVR::CPVRChannelGroupsContainer::Load() in xbmc/pvr/channels/PVRChannelGroupsContainer.cpp:69
  4: PVR::CPVRManager::Load() in xbmc/pvr/PVRManager.cpp:542
  5: PVR::CPVRManager::Process() in xbmc/pvr/PVRManager.cpp:406
  6: CThread::Action() in xbmc/threads/Thread.cpp:220
  7: CThread::staticThread(void*) in xbmc/threads/Thread.cpp:130
  8: start_thread in /build/buildd/eglibc-2.17/nptl/pthread_create.c:311
  9: clone in /build/buildd/eglibc-2.17/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:113
  • Loading branch information...
commit e0bb715983391164a14607fa5772143f290e7877 1 parent a70bf38
fetzerch authored September 15, 2013

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  xbmc/pvr/channels/PVRChannelGroup.cpp
3  xbmc/pvr/channels/PVRChannelGroup.cpp
@@ -51,6 +51,7 @@ CPVRChannelGroup::CPVRChannelGroup(void) :
51 51
     m_bLoaded(false),
52 52
     m_bChanged(false),
53 53
     m_bUsingBackendChannelOrder(false),
  54
+    m_bSelectedGroup(false),
54 55
     m_bPreventSortAndRenumber(false)
55 56
 {
56 57
 }
@@ -63,6 +64,7 @@ CPVRChannelGroup::CPVRChannelGroup(bool bRadio, unsigned int iGroupId, const CSt
63 64
     m_bLoaded(false),
64 65
     m_bChanged(false),
65 66
     m_bUsingBackendChannelOrder(false),
  67
+    m_bSelectedGroup(false),
66 68
     m_bPreventSortAndRenumber(false)
67 69
 {
68 70
 }
@@ -75,6 +77,7 @@ CPVRChannelGroup::CPVRChannelGroup(const PVR_CHANNEL_GROUP &group) :
75 77
     m_bLoaded(false),
76 78
     m_bChanged(false),
77 79
     m_bUsingBackendChannelOrder(false),
  80
+    m_bSelectedGroup(false),
78 81
     m_bPreventSortAndRenumber(false)
79 82
 {
80 83
 }

0 notes on commit e0bb715

Please sign in to comment.
Something went wrong with that request. Please try again.