There is no reason to check if strlen(input) == length - justcheck if input[strlen(input)-1] != '\n' - it's not really important to only do this when you have strlen(input) == length-1, since the expensive part of the check is to do strlen - so we may just as well simply compare the end of the string with newline. It makes it ONE check, rather than two, making the code simpler.
I personally would probably just set a max line length of some rather large number, say 256 [assuming you do not have some really long input expected, in which case a larger number is appropriate]. If you do that, you can probably ignore checking for newline in the input string [although you probably will, one way or another deal with the fact that there is a newline at the end of the string - however, that is a slightly different matter].
--
Mats