Changeset 771 for branches


Ignore:
Timestamp:
09/19/06 17:49:30 (6 years ago)
Author:
wd
Message:

Try and fix a potential buffer issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-1.1/modules/ircd/commands/watch.c

    r579 r771  
    200200            int sblen = 0; 
    201201 
     202            /* XXX: static sized buffer-fuck.  this must be cleaned up */ 
    202203            wp = find_watch(cli->nick); 
    203204            sendto_one(cli, RPL_FMT(cli, RPL_WATCHSTAT), cwp->count, 
    204205                    (wp != NULL ? wp->count : 0)); 
    205206            LIST_FOREACH(wlp, &cwp->list, lpwtch) { 
    206                 if (320 - sblen <= strlen(wlp->watch->nick)) { 
     207                if (310 - sblen <= strlen(wlp->watch->nick)) { 
    207208                    /* send the list if it's getting full */ 
    208209                    sendto_one(cli, RPL_FMT(cli, RPL_WATCHLIST), sbuf); 
    209210                    sblen = 0; 
    210211                } 
    211                 sblen += snprintf(sbuf + sblen, 320 - sblen, "%s ", 
     212                sblen += snprintf(sbuf + sblen, 310 - sblen, "%s ", 
    212213                        wlp->watch->nick); 
    213214            } 
Note: See TracChangeset for help on using the changeset viewer.