tags 391051 + patch
stop

        Hi

 Attached is a patch attached for the new quilt-based packaging.

   Cheers,
-- 
Loïc Minier
Author: Ian Jackson <i...@ubuntu.com>
Description: Do not crash if regexp is too long for our buffer; LP #23494

--- mawk-1.3.3.orig/scan.c
+++ mawk-1.3.3/scan.c
@@ -1033,6 +1033,15 @@
    STRING *sval ;
 
    while (1)
+   {
+      if (p == string_buff + SPRINTF_SZ - 2)
+      {
+          compile_error(
+                         "regular expression /%.10s ..."
+                         " exceeds implementation size limit",
+                         string_buff) ;
+         mawk_exit(2) ;
+      }
       switch (scan_code[*p++ = next()])
       {
         case SC_DIV:           /* done */
@@ -1070,6 +1079,7 @@
            }
            break ;
       }
+   }
 
 out:
    /* now we've got the RE, so compile it */

Reply via email to