Fix buffer overrun

This commit is contained in:
Andreas Öman 2010-02-02 21:00:38 +00:00
parent 13cd7f67e6
commit 0385b58b3d

View file

@ -640,7 +640,7 @@ readlinefromfile(const char *path, char *buf, size_t buflen)
if(r < 0)
return -1;
buf[buflen] = 0;
buf[buflen - 1] = 0;
return 0;
}