Fix buffer overflow bug in read/write

see https://code.google.com/p/junixsocket/issues/detail?id=20
Thanks, Eric Delaunay!
Merge pull request #1 from kohlschuetter/ck1

Fix buffer overflow bug in read/write