I'd like to know a totally secure way of capturing strings without running buffer overflow or any other threat.
I read a lot about ready-made functions and would like to know which are the most recommended, but I wanted to be able to implement one and know how the thing really works.
So far, I have found it useful to use %(limite)[^\n]
to capture an entry until the user hits enter or reaches a number (limit) of characters read. For this case, if the user continues typing it will fill in the buffer (right?), So I will have to clear the buffer for the next read (right?). / p>