Skip to content

Commit

Permalink
Fix bad memset calls in JoystickMenuThread::Init(). Caught by coverity.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed May 10, 2012
1 parent 7d88cef commit 1725f1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/jsmenu.cpp
Expand Up @@ -124,10 +124,10 @@ int JoystickMenuThread::Init(QString &config_file)
** Allocate the arrays in which we track button and axis status
**----------------------------------------------------------------------*/
m_buttons = new int[m_buttonCount];
memset(m_buttons, '\0', sizeof(*m_buttons * m_buttonCount));
memset(m_buttons, '\0', m_buttonCount * sizeof(*m_buttons));

m_axes = new int[m_axesCount];
memset(m_axes, '\0', sizeof(*m_axes * m_axesCount));
memset(m_axes, '\0', m_axesCount * sizeof(*m_axes));

LOG(VB_GENERAL, LOG_INFO, LOC +
QString("Initialization of %1 succeeded using config file %2")
Expand Down

0 comments on commit 1725f1b

Please sign in to comment.