=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/indent/args.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/indent/args.c 2002/10/07 13:57:10 1.11 --- src/usr.bin/indent/args.c 2003/04/01 04:51:16 1.12 *************** *** 1,4 **** ! /* $OpenBSD: args.c,v 1.11 2002/10/07 13:57:10 mickey Exp $ */ /* * Copyright (c) 1980, 1993 --- 1,4 ---- ! /* $OpenBSD: args.c,v 1.12 2003/04/01 04:51:16 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 *************** *** 38,44 **** #ifndef lint /*static char sccsid[] = "@(#)args.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: args.c,v 1.11 2002/10/07 13:57:10 mickey Exp $"; #endif /* not lint */ /* --- 38,44 ---- #ifndef lint /*static char sccsid[] = "@(#)args.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: args.c,v 1.12 2003/04/01 04:51:16 deraadt Exp $"; #endif /* not lint */ /* *************** *** 174,184 **** home = getenv("HOME"); if (home != NULL && *home != '\0') { ! if (strlen(home) + sizeof(prof) + 1 > sizeof(fname)) { warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG)); return; } - sprintf(fname, "%s/%s", home, prof); if ((f = fopen(option_source = fname, "r")) != NULL) { scan_profile(f); (void) fclose(f); --- 174,183 ---- home = getenv("HOME"); if (home != NULL && *home != '\0') { ! if (snprintf(fname, sizeof fname, "%s/%s", home, prof) >= sizeof fname) { warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG)); return; } if ((f = fopen(option_source = fname, "r")) != NULL) { scan_profile(f); (void) fclose(f);