]> git.eshelyaron.com Git - emacs.git/commitdiff
(concat): Check for string overflow (bug#1787).
authorChong Yidong <cyd@stupidchicken.com>
Tue, 27 Jan 2009 21:16:32 +0000 (21:16 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 27 Jan 2009 21:16:32 +0000 (21:16 +0000)
src/fns.c

index 913705fcf80903247aadf360691ec55869c2c8b0..dd05f1f4ca7bd5ef4cb476ad4575b77658870211 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -603,6 +603,8 @@ concat (nargs, args, target_type, last_special)
        }
 
       result_len += len;
+      if (result_len < 0)
+       error ("String overflow");
     }
 
   if (! some_multibyte)