DaanDeMeyer / reproc

A cross-platform (C99/C++11) process library
MIT License
552 stars 65 forks source link

The example poll.c suffers from the buffer overflow problem #98

Closed yurivict closed 1 year ago

yurivict commented 1 year ago

This line would write into unallocated memory when number of bytes read (variable r) is 4096.

Child process can write out data of any kind, including lines that are over 4096 bytes in length.

DaanDeMeyer commented 1 year ago

That's why reproc_read() take a buffer and a size that specify the max amount of data that can be read