$NetBSD: patch-CVE-2001-1593_2,v 1.1 2014/02/05 17:20:31 drochner Exp $

--- lib/routines.h.orig	2007-12-29 01:37:59.000000000 +0000
+++ lib/routines.h
@@ -255,7 +255,8 @@ FILE * xwpopen PARAMS ((const char * com
 /* If _STR_ is not defined, give it a tempname in _TMPDIR_ */
 #define tempname_ensure(Str)				\
 do {							\
-  (Str) = (Str) ? (Str) : tempnam (NULL, "a2_");	\
+  (Str) = (Str) ? (Str) : safe_tempnam("a2_");	\
 } while (0)
+char * safe_tempnam(const char *);
 
 #endif
