=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ar/Attic/ar.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/ar/Attic/ar.c 2002/12/11 22:01:13 1.8 --- src/usr.bin/ar/Attic/ar.c 2003/04/04 22:12:08 1.9 *************** *** 1,4 **** ! /* $OpenBSD: ar.c,v 1.8 2002/12/11 22:01:13 millert Exp $ */ /* $NetBSD: ar.c,v 1.5 1995/03/26 03:27:44 glass Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: ar.c,v 1.9 2003/04/04 22:12:08 deraadt Exp $ */ /* $NetBSD: ar.c,v 1.5 1995/03/26 03:27:44 glass Exp $ */ /*- *************** *** 47,53 **** #if 0 static char sccsid[] = "@(#)ar.c 8.3 (Berkeley) 4/2/94"; #else ! static char rcsid[] = "$OpenBSD: ar.c,v 1.8 2002/12/11 22:01:13 millert Exp $"; #endif #endif /* not lint */ --- 47,53 ---- #if 0 static char sccsid[] = "@(#)ar.c 8.3 (Berkeley) 4/2/94"; #else ! static char rcsid[] = "$OpenBSD: ar.c,v 1.9 2003/04/04 22:12:08 deraadt Exp $"; #endif #endif /* not lint */ *************** *** 94,103 **** * Fix it, if necessary. */ if (*argv[1] != '-') { ! if (!(p = malloc((u_int)(strlen(argv[1]) + 2)))) err(1, NULL); *p = '-'; ! (void)strcpy(p + 1, argv[1]); /* ok */ argv[1] = p; } --- 94,106 ---- * Fix it, if necessary. */ if (*argv[1] != '-') { ! size_t len; ! ! len = (u_int)(strlen(argv[1]) + 2); ! if (!(p = malloc(len))) err(1, NULL); *p = '-'; ! (void)strlcpy(p + 1, argv[1], len - 1); argv[1] = p; }