File: CVE-2019-10061.patch

package info (click to toggle)
node-opencv 6.0.0%2Bgit20180416.cfc96ba0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 24,632 kB
  • sloc: xml: 476,707; cpp: 5,950; makefile: 114; sh: 59; ansic: 20
file content (51 lines) | stat: -rw-r--r-- 1,966 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Description: This patch is in reference with  CVE-2019-10061.
Author: Utkarsh Gupta
Origin: https://github.com/peterbraden/node-opencv/commit/81a4b8620188e89f7e4fc985f3c89b58d4bcc86b
 https://github.com/peterbraden/node-opencv/commit/aaece6921d7368577511f06c94c99dd4e9653563
Bug-Debian: https://bugs.debian.org/925571
Last-Update: 2019-03-26

--- node-opencv-6.0.0+git20180416.cfc96ba0.orig/src/FaceRecognizer.h
+++ node-opencv-6.0.0+git20180416.cfc96ba0/src/FaceRecognizer.h
@@ -8,6 +8,7 @@ namespace cv {
   using cv::face::FaceRecognizer;
 }
 #else
+#warning using opencv2 contrib
 #include "opencv2/contrib/contrib.hpp"
 #endif
 
--- node-opencv-6.0.0+git20180416.cfc96ba0.orig/utils/find-opencv.js
+++ node-opencv-6.0.0+git20180416.cfc96ba0/utils/find-opencv.js
@@ -2,13 +2,20 @@
 
 var exec = require("child_process").exec;
 var fs = require("fs");
-var flag = process.argv[2] || "--exists";
+
+var flags = {
+  '--cflags' : '--cflags',
+  '--libs' : '--libs'
+}
+var flag = flags[process.argv[2]] || '--exists'
+
+
 
 // Normally |pkg-config opencv ...| could report either OpenCV 2.x or OpenCV 3.y
 // depending on what is installed.  To enable both 2.x and 3.y to co-exist on
 // the same machine, the opencv.pc for 3.y can be installed as opencv3.pc and
 // then selected by |export PKG_CONFIG_OPENCV3=1| before building node-opencv.
-var opencv = process.env.PKG_CONFIG_OPENCV3 === "1" ? "opencv3" : '"opencv >= 2.3.1"';
+var opencv = process.env.PKG_CONFIG_OPENCV3 === "1" ? "opencv3" : ' "opencv >= 2.3.1"';
 
 function main(){
     //Try using pkg-config, but if it fails and it is on Windows, try the fallback
@@ -18,7 +25,7 @@ function main(){
                 fallback();
             }
             else{
-                throw new Error("ERROR: failed to run: pkg-config", opencv, flag);
+              throw new Error("ERROR: failed to run: pkg-config" + opencv + " " + flag + " - Is OpenCV installed?");
             }
         }
         else{