summaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-08-29 09:55:41 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-08-29 09:55:41 +0000
commit1b1a9f3ec775edb6ae5c6cf7b78ec5cc3b348c67 (patch)
tree045ca897a83e6437aad692954eb8561563edc446 /fastos
parentf4deb7fdebad102c6213d73ccd6440f3450b0a3a (diff)
Avoid out of bounds error
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/tests/sockettest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fastos/src/tests/sockettest.cpp b/fastos/src/tests/sockettest.cpp
index f0be5c0fddb..b903aee6f50 100644
--- a/fastos/src/tests/sockettest.cpp
+++ b/fastos/src/tests/sockettest.cpp
@@ -98,7 +98,7 @@ private:
int ReceiveBufferSpace ()
{
return static_cast<int>
- (reinterpret_cast<unsigned char *>(&_receiveBuffer[BUFFER_SIZE]) -
+ (reinterpret_cast<unsigned char *>((_receiveBuffer + BUFFER_SIZE) -
_receivePtr);
}