#3 Invalid_argument "index out of bounds" exception.

None
closed
nobody
None
5
2014-09-06
2006-04-20
Anonymous
No

When a I sent an email with Netsmtp module, I get:

Uncaught exception: Invalid_argument "index out of bounds"

I have made a change in the 'client#data' source:

while true do
let l = chan # input_line () in
if String.length l > 0 && l.[0] = '.' then oc
# output_char '.';
oc # output_string l;
let pos = if String.length l > 2 then 2 else 1 in
oc # output_string
(if String.length l > 0 &&
l.[String.length l - pos] = '\r' then "\n" else "\r\n")

Now, I can sent emails.

Discussion

  • Gerd Stolpmann
    Gerd Stolpmann
    2014-09-06

    Bug was still there :-(
    Fixed differently.

     
  • Gerd Stolpmann
    Gerd Stolpmann
    2014-09-06

    • status: open --> accepted
    • Group: -->
     
  • Gerd Stolpmann
    Gerd Stolpmann
    2014-09-06

    • status: accepted --> closed