Update 4.3.1 --> 4.4.0

This commit is contained in:
Cy Schubert 2016-06-21 11:20:48 +00:00
parent d44a632715
commit f2e766b1be
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=417201
5 changed files with 24 additions and 66 deletions

View file

@ -2,8 +2,7 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= screen PORTNAME= screen
PORTVERSION= 4.3.1 PORTVERSION= 4.4.0
PORTREVISION= 2
CATEGORIES= sysutils CATEGORIES= sysutils
MASTER_SITES= http://ftp.gnu.org/gnu/screen/ \ MASTER_SITES= http://ftp.gnu.org/gnu/screen/ \
ftp://ftp.gnu.org/gnu/screen/ \ ftp://ftp.gnu.org/gnu/screen/ \

View file

@ -1,2 +1,3 @@
SHA256 (screen-4.3.1.tar.gz) = fa4049f8aee283de62e283d427f2cfd35d6c369b40f7f45f947dbfd915699d63 TIMESTAMP = 1466506261
SIZE (screen-4.3.1.tar.gz) = 845958 SHA256 (screen-4.4.0.tar.gz) = ef722a54759a3bf23aad272bbf33c414c1078cad6bcd982fada93c0d7917218b
SIZE (screen-4.4.0.tar.gz) = 846010

View file

@ -1,55 +0,0 @@
From b7484c224738247b510ed0d268cd577076958f1b Mon Sep 17 00:00:00 2001
From: Kuang-che Wu <kcwu@csie.org>
Date: Mon, 31 Aug 2015 17:49:57 +0000
Subject: Fix stack overflow due to too deep recursion
Bug: 45713
How to reproduce:
Run this command inside screen
$ printf '\x1b[10000000T'
screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge.
---
diff --git a/src/ansi.c b/src/ansi.c
index a342fb1..152d2ef 100644
--- ansi.c
+++ ansi.c
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce;
return;
if (n > 0)
{
+ if (ye - ys + 1 < n)
+ n = ye - ys + 1;
if (n > 256)
{
MScrollV(p, n - 256, ys, ye, bce);
n = 256;
}
- if (ye - ys + 1 < n)
- n = ye - ys + 1;
#ifdef COPY_PASTE
if (compacthist)
{
@@ -2562,14 +2562,14 @@ int n, ys, ye, bce;
}
else
{
- if (n < -256)
- {
- MScrollV(p, n + 256, ys, ye, bce);
- n = -256;
- }
n = -n;
if (ye - ys + 1 < n)
n = ye - ys + 1;
+ if (n > 256)
+ {
+ MScrollV(p, - (n - 256), ys, ye, bce);
+ n = 256;
+ }
ml = p->w_mlines + ye;
/* Clear lines */
--
cgit v0.9.0.2

View file

@ -1,6 +1,17 @@
--- os.h.orig 2014-04-26 03:58:35.000000000 -0700 --- os.h.orig 2016-06-19 12:41:03.000000000 -0700
+++ os.h 2014-04-29 19:16:31.730773575 -0700 +++ os.h 2016-06-21 04:13:47.509485000 -0700
@@ -524,6 +528,6 @@ @@ -252,7 +252,9 @@
#if defined(UTMPOK) || defined(BUGGYGETLOGIN)
# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
# include <utmpx.h>
-# define UTMPFILE UTMPX_FILE
+# ifdef UTMPX_FILE /* GNU extension */
+# define UTMPFILE UTMPX_FILE
+# endif
# define utmp utmpx
# define getutent getutxent
# define getutid getutxid
@@ -524,6 +526,6 @@
/* Changing those you won't be able to attach to your old sessions /* Changing those you won't be able to attach to your old sessions
* when changing those values in official tree don't forget to bump * when changing those values in official tree don't forget to bump
* MSG_VERSION */ * MSG_VERSION */

View file

@ -1,5 +1,5 @@
--- utmp.c.orig 2015-06-28 14:37:40.000000000 -0700 --- utmp.c.orig 2016-06-19 12:41:03.000000000 -0700
+++ utmp.c 2015-07-02 13:22:34.463948044 -0700 +++ utmp.c 2016-06-21 04:10:22.500131000 -0700
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
**************************************************************** ****************************************************************
*/ */
@ -88,10 +88,11 @@
/* must use temp variable because of NetBSD/sparc64, where /* must use temp variable because of NetBSD/sparc64, where
* ut_xtime is long(64) but time_t is int(32) */ * ut_xtime is long(64) but time_t is int(32) */
(void)time(&now); (void)time(&now);
- u->ut_time = now;
+#if defined(__FreeBSD_version) && __FreeBSD_version < 900000 +#if defined(__FreeBSD_version) && __FreeBSD_version < 900000
+ u->ut_time = now; + u->ut_time = now;
+#else +#else
u->ut_tv.tv_sec = now; + u->ut_tv.tv_sec = now;
+#endif +#endif
} }
@ -100,10 +101,11 @@
strncpy(u->ut_line, line, sizeof(u->ut_line)); strncpy(u->ut_line, line, sizeof(u->ut_line));
strncpy(u->ut_name, user, sizeof(u->ut_name)); strncpy(u->ut_name, user, sizeof(u->ut_name));
(void)time(&now); (void)time(&now);
- u->ut_time = now;
+#if defined(__FreeBSD_version) && __FreeBSD_version < 900000 +#if defined(__FreeBSD_version) && __FreeBSD_version < 900000
+ u->ut_time = now; + u->ut_time = now;
+#else +#else
u->ut_tv.tv_sec = now; + u->ut_tv.tv_sec = now;
+#endif +#endif
} }