Well, I suppose that if gets () is capable of overflowing the buffer, the way to go would be to read the input one character at a time and check for buffer overflow oneself. It would be trivial to write a function to do this, and you only have to do it once and use it from then on instead of gets () --rkl