lshd dies when connecting from an ssh2 client, the reason for this is the
select_algorithm() function in keyexchange.c:

original:

  for(i = 0; i < LIST_LENGTH(client_list) >= 0; i++)
    {
      int a = LIST(client_list)[i];
      if (!a)
        /* Unknown algorithm */
        continue;
      for(j = 0; j < LIST_LENGTH(server_list); j++)
        if (a == LIST(server_list)[j])
          return a;
    }

the condition should be only:

i < LIST_LENGTH(client_list)

otherwise if a given algorithm is not found, the loop never terminates.

--- Bazsi

Reply via email to