Add missing NULL checks after strdup() for the json file path in
da_json_file() and the cookie name in da_properties_cookie().
This should be backported to lower branches.
return -1;
}
global_deviceatlas.jsonpath = strdup(args[1]);
+ if (unlikely(global_deviceatlas.jsonpath == NULL)) {
+ memprintf(err, "deviceatlas json file : out of memory.\n");
+ return -1;
+ }
return 0;
}
return -1;
} else {
global_deviceatlas.cookiename = strdup(args[1]);
+ if (unlikely(global_deviceatlas.cookiename == NULL)) {
+ memprintf(err, "deviceatlas cookie name : out of memory.\n");
+ return -1;
+ }
}
global_deviceatlas.cookienamelen = strlen(global_deviceatlas.cookiename);
return 0;