9a74f2c
diff --git a/src/display.h b/src/display.h
9a74f2c
index e8b3b80..b1ab748 100644
9a74f2c
--- a/src/display.h
9a74f2c
+++ b/src/display.h
9a74f2c
@@ -73,7 +73,7 @@ struct display
9a74f2c
   struct win *d_other;		/* pointer to other window */
9a74f2c
   int   d_nonblock;		/* -1 don't block if obufmax reached */
9a74f2c
 				/* >0: block after nonblock secs */
9a74f2c
-  char  d_termname[20 + 1];	/* $TERM */
9a74f2c
+  char  d_termname[40 + 1];	/* $TERM */
9a74f2c
   char	*d_tentry;		/* buffer for tgetstr */
9a74f2c
   char	d_tcinited;		/* termcap inited flag */
9a74f2c
   int	d_width, d_height;	/* width/height of the screen */
9a74f2c
diff --git a/src/screen.h b/src/screen.h
9a74f2c
index 5c93f32..1a388e3 100644
9a74f2c
--- a/src/screen.h
9a74f2c
+++ b/src/screen.h
9a74f2c
@@ -214,7 +214,7 @@ struct msg
9a74f2c
 	  char preselect[20];
9a74f2c
 	  int esc;		/* his new escape character unless -1 */
9a74f2c
 	  int meta_esc;		/* his new meta esc character unless -1 */
9a74f2c
-	  char envterm[20 + 1];	/* terminal type */
9a74f2c
+	  char envterm[40 + 1];	/* terminal type */
9a74f2c
 	  int encoding;		/* encoding of display */
9a74f2c
 	  int detachfirst;      /* whether to detach remote sessions first */
9a74f2c
 	}