UGN Security
Posted By: Skull Input buffer - 09/26/02 03:47 AM
I am trying to make a program in C but am running into problems with my input buffer storing characters that i dont want it to store. Is their a simple way to wipe this buffer clean every time i run though the loop i have it going through?

Regards,

Skull
Posted By: SilentRage Re: Input buffer - 09/26/02 01:11 PM
yeah, I had a problem with that in my buffer in my telnet router program. Here's what I did:

ZeroMemory(&buffer[0], 4096);

Full code found at:
ftp://serialcoders.sytes.net/Router/TelnetRouter_v3.0.zip
Posted By: Skull Re: Input buffer - 09/30/02 03:34 AM
Thanks Mr. Rage

An Alternitvie solution that i found is the setbuf(); function in conjuncture with the fflush() funcition. The set buf allows you to use a user defined var as your inputbuffer with a size that you spefify. Then using the fflush() it will flush that buffer retruning the null character to the first slot.

Regards,

Skull
© UGN Security Forum