Module Name:    src
Committed By:   christos
Date:           Thu Nov 26 01:03:22 UTC 2015

Modified Files:
        src/lib/libterminfo: term.c

Log Message:
Always copy the area buffer, even when the length was the same
(from Rin Okuyama)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libterminfo/term.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libterminfo/term.c
diff -u src/lib/libterminfo/term.c:1.18 src/lib/libterminfo/term.c:1.19
--- src/lib/libterminfo/term.c:1.18	Wed Nov 25 14:13:49 2015
+++ src/lib/libterminfo/term.c	Wed Nov 25 20:03:22 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.18 2015/11/25 19:13:49 christos Exp $ */
+/* $NetBSD: term.c,v 1.19 2015/11/26 01:03:22 christos Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: term.c,v 1.18 2015/11/25 19:13:49 christos Exp $");
+__RCSID("$NetBSD: term.c,v 1.19 2015/11/26 01:03:22 christos Exp $");
 
 #include <sys/stat.h>
 
@@ -100,8 +100,8 @@ _ti_readterm(TERMINAL *term, const char 
 		term->_area = realloc(term->_area, term->_arealen);
 		if (term->_area == NULL)
 			return -1;
-		memcpy(term->_area, cap, term->_arealen);
 	}
+	memcpy(term->_area, cap, term->_arealen);
 
 	cap = term->_area;
 	len = le16dec(cap);

Reply via email to