Show
Ignore:
Timestamp:
06/09/09 14:11:47 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1244556707 +0000
git-parent:

[43db6fd05a8814ba23c94d2dcc0388ca23393e10]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1244556707 +0000
Message:

closes #143

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noitedit/readline.c

    r04662ba ra2ad361  
    13271327        txt += len; 
    13281328 
    1329         temp = malloc(strlen(pass->pw_dir) + 1 + strlen(txt) + 1); 
    1330         (void) sprintf(temp, "%s/%s", pass->pw_dir, txt); 
     1329        /* Reuse len to use snprintf */ 
     1330        len = strlen(pass->pw_dir) + 1 + strlen(txt) + 1; 
     1331        temp = malloc(len); 
     1332        (void) snprintf(temp, len, "%s/%s", pass->pw_dir, txt); 
    13311333 
    13321334        return (temp); 
     
    14151417                    ((dirname) ? strlen(dirname) : 0) + 1 + 1; 
    14161418                temp = malloc(len); 
    1417                 (void) sprintf(temp, "%s%s", 
     1419                (void) snprintf(temp, len, "%s%s", 
    14181420                    dirname ? dirname : "", entry->d_name);     /* safe */ 
    14191421