~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A couple of places in sk_newlistener were using AF_INET6 even with NO_IPV6.
[sgt/putty]
/
unix
/
uxpty.c
diff --git
a/unix/uxpty.c
b/unix/uxpty.c
index
b5164e2
..
96489e1
100644
(file)
--- a/
unix/uxpty.c
+++ b/
unix/uxpty.c
@@
-24,7
+24,7
@@
#include "putty.h"
#include "tree234.h"
#include "putty.h"
#include "tree234.h"
-#if
def HAVE_UTMPX_H
+#if
ndef OMIT_UTMP
#include <utmpx.h>
#endif
#include <utmpx.h>
#endif
@@
-754,15
+754,19
@@
static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
for (i = 3; i < 1024; i++)
close(i);
{
for (i = 3; i < 1024; i++)
close(i);
{
- char term_env_var[10 + sizeof(cfg->termtype)];
- sprintf(term_env_var, "TERM=%s", cfg->termtype);
+ char *term_env_var = dupprintf("TERM=%s", cfg->termtype);
putenv(term_env_var);
putenv(term_env_var);
+ /* We mustn't free term_env_var, as putenv links it into the
+ * environment in place.
+ */
}
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
{
}
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
{
- char windowid_env_var[40];
- sprintf(windowid_env_var, "WINDOWID=%ld", windowid);
+ char *windowid_env_var = dupprintf("WINDOWID=%ld", windowid);
putenv(windowid_env_var);
putenv(windowid_env_var);
+ /* We mustn't free windowid_env_var, as putenv links it into the
+ * environment in place.
+ */
}
#endif
{
}
#endif
{