Changeset 46 in libcf for trunk/src/cf_log.c


Ignore:
Timestamp:
03/29/13 14:40:25 (11 years ago)
Author:
cheese
Message:

#1 change timeout mechanism from setting socket option to using select

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_log.c

    r45 r46  
    304304
    305305    CF_Log_Local_GetTimeString (datetime);
    306     sprintf (buffer, "[%s][%s] ", datetime, prefix);
     306    snprintf (buffer, sizeof (buffer) - 1, "[%s][%s] ", datetime, prefix);
    307307    vsprintf (buffer + strlen (buffer), fmt, valist);
    308308
     
    408408            TRY_BREAK;
    409409        }
    410         sprintf (context->path, "%s", path);
     410        snprintf (context->path, sizeof (context->path) -1, "%s", path);
    411411
    412412        if (size > 0)
Note: See TracChangeset for help on using the changeset viewer.