File: 010_hardened-arguments.patch

package info (click to toggle)
proxycheck 0.49a-9
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 376 kB
  • sloc: ansic: 4,461; sh: 748; makefile: 130
file content (18 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Subject: Hardening insecure argument checking
From: Al Nikolov <clown@debian.org>
Index: proxycheck/proxycheck.c
===================================================================
--- proxycheck.orig/proxycheck.c
+++ proxycheck/proxycheck.c
@@ -406,7 +406,10 @@ init(int argc, char **argv) {
       if (p)
         check_arg = p + 1, *p = ':';
       else
-        check_arg = NULL;
+        if (strcmp(optarg, "chat") == 0)
+          usage("this check requires parameters");
+        else
+          check_arg = NULL;
       break;
 
     case 'b':