=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mktemp/mktemp.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/mktemp/mktemp.c 2003/04/07 19:25:43 1.9 --- src/usr.bin/mktemp/mktemp.c 2003/04/25 20:02:02 1.10 *************** *** 1,4 **** ! /* $OpenBSD: mktemp.c,v 1.9 2003/04/07 19:25:43 millert Exp $ */ /* * Copyright (c) 1996, 1997, 2001 Todd C. Miller --- 1,4 ---- ! /* $OpenBSD: mktemp.c,v 1.10 2003/04/25 20:02:02 millert Exp $ */ /* * Copyright (c) 1996, 1997, 2001 Todd C. Miller *************** *** 28,34 **** */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: mktemp.c,v 1.9 2003/04/07 19:25:43 millert Exp $"; #endif /* not lint */ #include --- 28,34 ---- */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: mktemp.c,v 1.10 2003/04/25 20:02:02 millert Exp $"; #endif /* not lint */ #include *************** *** 99,106 **** while (plen != 0 && prefix[plen - 1] == '/') plen--; ! tempfile = NULL; ! asprintf(&tempfile, "%.*s/%s", plen, prefix, template); } else tempfile = strdup(template); if (tempfile == NULL) { --- 99,106 ---- while (plen != 0 && prefix[plen - 1] == '/') plen--; ! if (asprintf(&tempfile, "%.*s/%s", plen, prefix, template) < 0) ! tempfile = NULL; } else tempfile = strdup(template); if (tempfile == NULL) {