protect against potential buffer overflow

This commit is contained in:
Simon Kornblith 2010-12-19 06:28:37 +00:00
parent afea210a99
commit 1ed0c88c32

View File

@ -49,7 +49,7 @@ onmessage = function(event) {
var fd = open(path, 0);
// read from fifo and close it
read(fd, buf, BUFFER_SIZE);
read(fd, buf, BUFFER_SIZE-1);
close(fd);
// extract message