changeset 101587:dfed39918c22

(concat): Check for string overflow (bug#1787).
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 27 Jan 2009 21:16:32 +0000
parents 02b129d40b50
children b7197e72fe7a
files src/fns.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Tue Jan 27 21:16:14 2009 +0000
+++ b/src/fns.c	Tue Jan 27 21:16:32 2009 +0000
@@ -603,6 +603,8 @@
 	}
 
       result_len += len;
+      if (result_len < 0)
+	error ("String overflow");
     }
 
   if (! some_multibyte)