[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: [Groff] Bug#56702: [PATCH] security bugfix for grohtml
From: |
Jeroen Ruigrok/Asmodai |
Subject: |
Re: Fw: [Groff] Bug#56702: [PATCH] security bugfix for grohtml |
Date: |
Thu, 10 Feb 2000 22:58:04 +0100 |
-On [20000207 16:00], Gaius Mulley (address@hidden) wrote:
>
>-static FILE *create_file (char *filename)
>+/*
>+ * create_tmp_file - opens a filename in /tmp carefully checking for failure
>+ * otherwise security could be circumvented.
>+ */
>+
>+static FILE *create_tmp_file (char *filename)
> {
> FILE *f;
>+ int fd;
This whole snippet plus some more really reminds of the functions:
mktemp(), mkstemp(), mkstemps() and these should be pretty portable.
You might, or not of course, want to consider using these instead,
unless I must've missed the idea of code presented for the temp file
creation.
--
Jeroen Ruigrok vd Werven/Asmodai address@hidden|bart.nl|freebsd.org]
Documentation nutter/B-rated Coder BSD: Technical excellence at its best
The BSD Programmer's Documentation Project <http://home.wxs.nl/~asmodai>
Slow down, god can't hear you...