jneufeld/clines — Issue #1: Buffer overflow
Author: ealter
Created: 2011-12-21 07:05:04+00:00
State: open

Your code is vulnerable to buffer overflow. Instead of using a dynamically expanding buffer to read in the line, you use a static array of size 256 with no bounds checking.

Also, consider using the function fgets. It basically does that reading in loop for you.

If you'd like, I'll fork it and submit a patch.