Skip to content

Commit

Permalink
Merge pull request MoSync#241 from andersmalm/ThreeOneOne
Browse files Browse the repository at this point in the history
[MOSYNC-2371]: Properly initialize nameBufSize member in maBtGetNew* thu...
  • Loading branch information
Anders Malm committed Sep 5, 2012
2 parents 161ae68 + 64b10c3 commit b26c567
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtimes/cpp/base/Syscall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ namespace Base {
#if !defined(_android)
int Syscall::maBtGetNewDevice(MABtDevice* dst) {
MABtDeviceNative dn;
dn.nameBufSize = dst->nameBufSize;
dn.name = (char*)GetValidatedMemRange(dst->name, dst->nameBufSize);
int res = BLUETOOTH(maBtGetNewDevice)(&dn);
dst->actualNameLength = dn.actualNameLength;
Expand All @@ -999,6 +1000,7 @@ namespace Base {
if(res <= 0)
return res;
MABtServiceNative sn;
sn.nameBufSize = dst->nameBufSize;
sn.name = (char*)GetValidatedMemRange(dst->name, dst->nameBufSize);
sn.uuids = (MAUUID*)GetValidatedMemRange(dst->uuids, ss.nUuids * sizeof(MAUUID));
res = BLUETOOTH(maBtGetNewService)(&sn);
Expand Down

0 comments on commit b26c567

Please sign in to comment.