Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bad memset calls in JoystickMenuThread::Init(). Caught by coverity.

  • Loading branch information...
commit 1725f1b75794303fc88da2589ee924529dea703d 1 parent 7d88cef
@stuartm stuartm authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 mythtv/libs/libmythui/jsmenu.cpp
View
4 mythtv/libs/libmythui/jsmenu.cpp
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.