Skip to content

Commit

Permalink
Fixed array overflow discovered when building under XCode
Browse files Browse the repository at this point in the history
Signed-off-by: robertsonics <jamie@robertsonics.com>
  • Loading branch information
robertsonics committed Feb 10, 2014
1 parent 2879c65 commit 7132251
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/Communicator.cpp
Expand Up @@ -161,7 +161,7 @@ void Communicator::closePort(void)
// getDeviceInfo
bool Communicator::getDeviceInfo(void) {

unsigned char xbuf[8];
unsigned char xbuf[16];

if (pSP == nullptr)
return false;
Expand All @@ -188,7 +188,7 @@ unsigned char xbuf[8];
// getDeviceStatus
bool Communicator::getDeviceStatus(void) {

unsigned char xbuf[8];
unsigned char xbuf[16];

if (pSP == nullptr)
return false;
Expand All @@ -207,7 +207,7 @@ unsigned char xbuf[8];
// stopAll
bool Communicator::stopAll(void) {

unsigned char xbuf[8];
unsigned char xbuf[16];

if (pSP == nullptr)
return false;
Expand All @@ -226,7 +226,7 @@ unsigned char xbuf[8];
// stopAll
bool Communicator::volume(int iVol) {

unsigned char xbuf[8];
unsigned char xbuf[16];
unsigned short uVal;

if (pSP == nullptr)
Expand All @@ -249,7 +249,7 @@ unsigned short uVal;
// controlTrack
bool Communicator::controlTrack(int mode, int trackNum) {

unsigned char xbuf[8];
unsigned char xbuf[16];

if (pSP == nullptr)
return false;
Expand All @@ -274,7 +274,7 @@ unsigned char xbuf[8];
// trackVolume
bool Communicator::trackVolume(int trackNum, int iVol) {

unsigned char xbuf[8];
unsigned char xbuf[16];
unsigned short uVal;

if (pSP == nullptr)
Expand Down Expand Up @@ -302,7 +302,7 @@ unsigned short uVal;
// ampPower
bool Communicator::ampPower(bool ampState) {

unsigned char xbuf[8];
unsigned char xbuf[16];

if (pSP == nullptr)
return false;
Expand Down

0 comments on commit 7132251

Please sign in to comment.