File: 04-reject-bad-args.patch

package info (click to toggle)
perl-byacc 2.0-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 720 kB
  • sloc: ansic: 7,136; yacc: 2,035; perl: 1,779; makefile: 160; sh: 9
file content (25 lines) | stat: -rw-r--r-- 760 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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();