public inbox for
help / color / mirror / Atom feed
Subject: gnats/317: bad decl of tmpdir in  temporary_directory() in misc.c
Date: Wed, 02 Jan 2002 20:39:00 -0000	[thread overview]
Message-ID: <> (raw)

>Number:         317
>Category:       gnats
>Synopsis:       bad decl of tmpdir in  temporary_directory() in misc.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 02 23:36:17 -0500 2002
>Originator:     Forrest Cavalier
Mib Software
GNATS 4.0 from cvs.
On WIN32
In misc.c, bad decl of tmpdir
  char tmpdir = *getenv ("TMPDIR");
  if (tmpdir == NULL)

Generates a warning, but probably incorrect
code too.  Could segfault since getenv() could
return NULL, leading to *(NULL).
--- gnats/gnats/gnats/misc.c	Thu Dec 06 17:25:21 2001
+++ modified/gnats/misc.c	Wed Jan 02 23:29:29 2002
@@ -499,7 +499,7 @@
 #ifdef P_tmpdir
   return P_tmpdir;
-  char tmpdir = *getenv ("TMPDIR");
+  char *tmpdir = getenv ("TMPDIR");
   if (tmpdir == NULL)
       tmpdir = "/tmp";

Gnats-prs mailing list

             reply	other threads:[~2002-01-03  4:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-02 20:39 forrest [this message]
2002-01-04 14:33 ` Milan Zamazal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).