2
I would like to know a totally safe way to capture strings without running the risk of buffer overflow or any other threat.
I read a lot about ready-made functions and would like to know which ones are the most recommended, but I wish I could implement one and know how the thing really works.
So far, I found it a good use %(limite)[^\n]
to capture an entry until the user enters or reaches a number (limit) of characters read. For this case, if the user keeps typing it will fill the buffer (right ? ), so I’ll have to clean up the buffer for the next reading (right?).