Changeset 524 for trunk/src


Ignore:
Timestamp:
Apr 6, 2017, 7:42:05 PM (8 years ago)
Author:
katerina
Message:

Fix for ticket #419 (broken SetSocketPassword authentication).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_socket.c

    r481 r524  
    809809
    810810#if defined(NEED_PASSWORD_AUTH)
    811 char * check_password(char * message, int * client_uid, int talkfd)
     811char * check_password(char * message, size_t msglen, int * client_uid, int talkfd)
    812812{
    813813  char * cmd = NULL;
     
    823823   */
    824824  if (0 == strcmp(goodpassword, message) &&
    825       strlen(goodpassword) < (sizeof(message)/2))
     825      strlen(goodpassword) < (msglen/2))
    826826    {
    827827      *client_uid = sh_socket_flaguid;
     
    902902
    903903#elif defined(NEED_PASSWORD_AUTH)
    904   cmd = check_password(message, &client_uid, talkfd);
     904  cmd = check_password(message, sizeof(message), &client_uid, talkfd);
    905905
    906906#else
Note: See TracChangeset for help on using the changeset viewer.