Edit: Title changed, as @Gunner pointed out that this is not a buffer overflow.
In reading user input from stdin with NR_read
stdin
NR_read
You could read the input until newline character is found.