Changeset 22 for trunk/src/sh_entropy.c


Ignore:
Timestamp:
Feb 23, 2006, 12:03:58 AM (19 years ago)
Author:
rainer
Message:

Minor code revisions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_entropy.c

    r1 r22  
    170170        memset( &addr, 0, sizeof(addr) );
    171171        addr.sun_family = AF_UNIX;
    172         strcpy( addr.sun_path, name );              /* known to fit  */
     172        sl_strlcpy( addr.sun_path, name, sizeof(addr.sun_path) );
    173173        addr_len = offsetof( struct sockaddr_un, sun_path )
    174174                   + strlen( addr.sun_path );
     
    570570  char * arg[4];
    571571  char * envp[2];
     572  size_t len;
    572573
    573574  SL_ENTER(_("sh_popen"));
     
    580581  if (sh.timezone != NULL)
    581582    {
    582       envp[0] = malloc (sl_strlen(sh.timezone) + 4);     /* free() ok     */
     583      len = sl_strlen(sh.timezone) + 4;
     584      envp[0] = malloc (len);     /* free() ok     */
    583585      if (envp[0] != NULL)
    584         sprintf (envp[0], "TZ=%s", sh.timezone);         /* known to fit  */
     586        sl_snprintf (envp[0], len, "TZ=%s", sh.timezone);
    585587      else
    586588        envp[0] = NULL;
     
    778780        sl_strlcat(combuf, _(source[i].command), 80);
    779781
     782        /* flawfinder: ignore */
    780783        if ( access (combuf, X_OK) == 0)
    781784          {
Note: See TracChangeset for help on using the changeset viewer.