[BACK]Return to args.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / indent

Diff for /src/usr.bin/indent/args.c between version 1.11 and 1.12

version 1.11, 2002/10/07 13:57:10 version 1.12, 2003/04/01 04:51:16
Line 174 
Line 174 
   
     home = getenv("HOME");      home = getenv("HOME");
     if (home != NULL && *home != '\0') {      if (home != NULL && *home != '\0') {
         if (strlen(home) + sizeof(prof) + 1 > sizeof(fname)) {          if (snprintf(fname, sizeof fname, "%s/%s", home, prof) >= sizeof fname) {
             warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG));              warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG));
             return;              return;
         }          }
         sprintf(fname, "%s/%s", home, prof);  
         if ((f = fopen(option_source = fname, "r")) != NULL) {          if ((f = fopen(option_source = fname, "r")) != NULL) {
             scan_profile(f);              scan_profile(f);
             (void) fclose(f);              (void) fclose(f);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12