Patch #957 2006-03-27 15:27

dermeister

Conditional jump or move depends on uninitialised value(s)
Download
957-Conditional_jum.patch (425 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2006-03-28 21:08
Assigned to
 
Index: src/sdk/cbthreadpool.cpp
===================================================================
--- src/sdk/cbthreadpool.cpp    (revision 2261)
+++ src/sdk/cbthreadpool.cpp    (working copy)
@@ -136,6 +136,7 @@
 cbThreadPool::cbThreadPool(wxEvtHandler* owner, int id, int concurrentThreads)
     : m_pOwner(owner),
     m_ID(id),
+    m_ConcurrentThreads(0),
     m_Done(true),
     m_Batching(false),
     m_Counter(0),
dermeister 2006-03-27 15:28

Without this patch the if-statement in cbThreadPool::SetConcurrentThreads would depend on the uninitialised value of cbThreadPool::m_ConcurrentThreads. I'm not sure if 0 is a good choice for the initialization but it seems to work.