public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
* gnats/317: bad decl of tmpdir in  temporary_directory() in misc.c
@ 2002-01-02 20:39 forrest
  2002-01-04 14:33 ` Milan Zamazal
  0 siblings, 1 reply; 2+ messages in thread
From: forrest @ 2002-01-02 20:39 UTC (permalink / raw)
  To: pdm-gnats, gnats-prs, bug-gnats

>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
>Release:        
>Organization:
Mib Software
>Environment:
GNATS 4.0 from cvs.
On WIN32
>Description:
In misc.c, bad decl of tmpdir
  char tmpdir = *getenv ("TMPDIR");
  if (tmpdir == NULL)

>How-To-Repeat:
Generates a warning, but probably incorrect
code too.  Could segfault since getenv() could
return NULL, leading to *(NULL).
>Fix:
--- 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;
 #else
-  char tmpdir = *getenv ("TMPDIR");
+  char *tmpdir = getenv ("TMPDIR");
   if (tmpdir == NULL)
     {
       tmpdir = "/tmp";
>Unformatted:
 

_______________________________________________
Gnats-prs mailing list
Gnats-prs@gnu.org
http://mail.gnu.org/mailman/listinfo/gnats-prs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-04 22:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 20:39 gnats/317: bad decl of tmpdir in temporary_directory() in misc.c forrest
2002-01-04 14:33 ` Milan Zamazal

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).