protect against potential buffer overflow
This commit is contained in:
parent
afea210a99
commit
1ed0c88c32
|
@ -49,7 +49,7 @@ onmessage = function(event) {
|
||||||
var fd = open(path, 0);
|
var fd = open(path, 0);
|
||||||
|
|
||||||
// read from fifo and close it
|
// read from fifo and close it
|
||||||
read(fd, buf, BUFFER_SIZE);
|
read(fd, buf, BUFFER_SIZE-1);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
// extract message
|
// extract message
|
||||||
|
|
Loading…
Reference in New Issue
Block a user