aboutsummaryrefslogtreecommitdiffstats
path: root/community/libupnp/CVE-2020-13848.patch
blob: ec4e7628120c320124e624172a925f3578d73302 (plain) (blame)
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
diff --git a/upnp/src/genlib/service_table/service_table.c b/upnp/src/genlib/service_table/service_table.c
index 98c2c0f..c2c4545 100644
--- a/upnp/src/genlib/service_table/service_table.c
+++ b/upnp/src/genlib/service_table/service_table.c
@@ -300,12 +300,12 @@ FindServiceEventURLPath( service_table * table,
     uri_type parsed_url;
     uri_type parsed_url_in;
 
-    if( ( table )
-        &&
-        ( parse_uri( eventURLPath,
-                     strlen( eventURLPath ),
-                     &parsed_url_in ) == HTTP_SUCCESS ) ) {
+	if (!table || !eventURLPath) {
+		return NULL;
+	}
 
+	if (parse_uri(eventURLPath, strlen(eventURLPath), &parsed_url_in) ==
+		HTTP_SUCCESS) {
         finger = table->serviceList;
         while( finger ) {
             if( finger->eventURL )
@@ -352,11 +352,11 @@ FindServiceControlURLPath( service_table * table,
     uri_type parsed_url;
     uri_type parsed_url_in;
 
-    if( ( table )
-        &&
-        ( parse_uri
-          ( controlURLPath, strlen( controlURLPath ),
-            &parsed_url_in ) == HTTP_SUCCESS ) ) {
+	if (!table || !controlURLPath) {
+		return NULL;
+	}
+	if (parse_uri(controlURLPath, strlen(controlURLPath), &parsed_url_in) ==
+		HTTP_SUCCESS) {
         finger = table->serviceList;
         while( finger ) {
             if( finger->controlURL )