Changeset 622 for trunk


Ignore:
Timestamp:
11/27/05 00:57:03 (6 years ago)
Author:
wd
Message:

Fix a couple of valgrind-detected errors.

Location:
trunk/modules/ircd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/ircd/addons/core.c

    r618 r622  
    648648        return CHANMODE_FAIL; 
    649649    } 
    650     strcpy(arg, cp->nick); /* Maintain exact case of nickname */ 
     650    if (arg != cp->nick) 
     651        strcpy(arg, cp->nick); /* Maintain exact case of nickname if the arg 
     652                                  came from somewhere but the client's nick */ 
    651653 
    652654    clp = find_chan_link(cp, chan); 
  • trunk/modules/ircd/protocols/shared/rfc1459_io.c

    r599 r622  
    6868            if (s - cp->buf < cp->buflen) { 
    6969                cp->buflen -= s - cp->buf; 
    70                 memcpy(cp->buf, s, cp->buflen); 
     70                memmove(cp->buf, s, cp->buflen); 
    7171                cp->buf[cp->buflen] = '\0'; 
    7272            } else { 
Note: See TracChangeset for help on using the changeset viewer.