Description: Reject Perl mode without perl module specified.
 This fixes crash problem reported by the Mayhem Team, Cylab, Carnegie
 Mellon University.
Author: Petter Reinholdtsen <pere@debian.org>
Bug-Debian: https://bugs.debian.org/716290
Forwarded: no
Reviewed-By: Petter Reinholdtsen
Last-Update: 2024-04-25

---
--- perl-byacc-2.0.orig/main.c
+++ perl-byacc-2.0/main.c
@@ -314,6 +314,12 @@ end_of_option:;
     if (language != PERL && perl5005flag)
         fprintf(stderr, "%s: Warning: -5 has no effect without Perl mode.\n",
 	        myname);
+    if (language == PERL && !perl_package)
+    {
+        fprintf(stderr, "%s: Perl mode require package name.\n",
+	        myname);
+	exit(1);
+    }
 
 no_more_options:;
     if (i + 1 != argc) usage();
