[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
'out of range' error in FD_SET
I have a program doing an ftp_list every
5 minutes, monitoring a remote directory.
At about the same time every day, I
get message " Length or start position is out of range for the string
operation." issued by procedure FD_SET.
The call stack looks like this:
ftp_list --> ftp_lstraw -->
get_byline --> bufline --> fd_set.
The file descriptor passed to fd_set
has a value of 224.
Just prior to the call to the line that
fails - it's a %subst - there's a call to proc CalcBitPos which returns
a value of 32. It's this value of 32 that is being used as the starting
position by the %subst on a field with length of only 28 that's causing
the error.