SmartAudio/package/avs/libsensory/files/wrapper/chk/read_chk.c

8 lines
176 B
C
Raw Normal View History

2018-07-13 01:31:50 +00:00
#include <unistd.h>
#include "fortify.h"
ssize_t __read_chk(int fd, void *buf, size_t count, size_t buflen)
{
if(buflen < count) __chk_fail();
return read(fd, buf, count);
}