Changeset de26f3c for protocols


Ignore:
Timestamp:
2011-10-30T11:33:49Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ff1616b
Parents:
e6b41b1
Message:

Killed careless use of strcpy(). Luckily these are only a risk on public
servers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/s5bytestream.c

    re6b41b1 rde26f3c  
    877877
    878878        if( ( ( host = strchr( proxy, ',' ) ) == 0 ) ||
    879              ( ( port = strchr( host+1, ',' ) ) == 0 ) ) {
     879            ( ( port = strchr( host+1, ',' ) ) == 0 ) )
     880        {
    880881                imcb_log( ic, "Error parsing proxy setting: \"%s\" (ignored)", proxy );
    881882                return NULL;
     
    889890        sh->jid = g_strdup( jid );
    890891        sh->host = g_strdup( host );
    891         strcpy( sh->port, port );
     892        g_snprintf( sh->port, sizeof( sh->port ), "%s", port );
    892893
    893894        return sh;
     
    915916                                sh->jid = g_strdup( tf->ini_jid );
    916917                                sh->host = g_strdup( host );
    917                                 strcpy( sh->port, port );
     918                                g_snprintf( sh->port, sizeof( sh->port ), "%s", port );
    918919                                bt->streamhosts = g_slist_append( bt->streamhosts, sh );
    919920
Note: See TracChangeset for help on using the changeset viewer.