Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/openzwave-controlpanel-0.2a+git20161006.a390f35/ozwcp.h Examining data/openzwave-controlpanel-0.2a+git20161006.a390f35/zwavelib.cpp Examining data/openzwave-controlpanel-0.2a+git20161006.a390f35/ozwcp.cpp Examining data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp Examining data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.h FINAL RESULTS: data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:341:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(fntemp, ".xml", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:469:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(fntemp, ".xml", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:521:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(fntemp, ".xml", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:635:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(fntemp, ".xml", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:802:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(fntemp, ".xml", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:909:2: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(fntemp, ".xml", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:178:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(s, len, FNF, filename); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:338:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fn = mktemp(fntemp); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:466:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fn = mktemp(fntemp); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:518:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fn = mktemp(fntemp); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:632:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fn = mktemp(fntemp); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:723:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(logbuffer, str); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:799:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fn = mktemp(fntemp); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:906:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fn = mktemp(fntemp); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1172:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(devname, (char *)cp->conn_arg2); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1543:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(devname, default_device); data/openzwave-controlpanel-0.2a+git20161006.a390f35/ozwcp.cpp:776:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((i = getopt(argc, argv, "dp:")) != EOF) data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1534:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. default_device = getenv("OZW_DEFAULT_DEVICE"); data/openzwave-controlpanel-0.2a+git20161006.a390f35/ozwcp.cpp:226:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:168:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ((fp = fopen(filename, "r")) == NULL)) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:296:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:297:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fntemp[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:350:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:378:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fntemp[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:390:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:488:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fntemp[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:497:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node = atoi((char *)arg1); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:498:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arg = atoi((char *)arg2); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:505:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node = atoi((char *)arg1); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:507:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). arg = atoi((char *)arg2); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:537:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:539:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fntemp[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:563:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sid = atoi((char *)arg1); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:652:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char logbuffer[logbufsz+1]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:654:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:657:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fntemp[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:687:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). (fp = fopen("./OZW_Log.txt", "r")) != NULL) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:817:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:819:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fntemp[32]; data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:110:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). response = MHD_create_response_from_buffer(strlen(data), (void *) data, MHD_RESPMEM_PERSISTENT); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:112:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). response = MHD_create_response_from_buffer(strlen(data), (void *) data, MHD_RESPMEM_MUST_COPY); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:114:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). response = MHD_create_response_from_buffer(strlen(data), (void *) data, MHD_RESPMEM_MUST_FREE); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:172:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(FNF) + strlen(filename) - 1; // len(%s) + 1 for \0 data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:172:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(FNF) + strlen(filename) - 1; // len(%s) + 1 for \0 data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:337:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fntemp, "/tmp/ozwcp.topo.XXXXXX", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:465:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fntemp, "/tmp/ozwcp.stat.XXXXXX", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:517:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fntemp, "/tmp/ozwcp.testheal.XXXXXX", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:631:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fntemp, "/tmp/ozwcp.scenes.XXXXXX", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:726:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(logbuffer, ","); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:798:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fntemp, "/tmp/ozwcp.poll.XXXXXX", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:905:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fntemp, "/tmp/ozwcp.devices.XXXXXX", sizeof(fntemp)); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1166:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). devname = (char *)malloc(strlen((char *)cp->conn_arg2) + 1); data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1277:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 0) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1288:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 0) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1319:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1325:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1331:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1340:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1346:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1352:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1358:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1364:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1370:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1376:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4 && data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1384:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4 && data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1392:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1408:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4 && cp->conn_arg3 != NULL) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1428:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4 && data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1429:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp->conn_arg3 != NULL && strlen((char *)cp->conn_arg3) > 0) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1448:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 0 && data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1449:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp->conn_arg3 != NULL && strlen((char *)cp->conn_arg3) > 0 && data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1450:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp->conn_arg4 != NULL && strlen((char *)cp->conn_arg4) > 0) { data/openzwave-controlpanel-0.2a+git20161006.a390f35/webserver.cpp:1537:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). devname = (char *)malloc(strlen(default_device) + 1); ANALYSIS SUMMARY: Hits = 73 Lines analyzed = 3105 in approximately 0.13 seconds (23200 lines/second) Physical Source Lines of Code (SLOC) = 2626 Hits@level = [0] 54 [1] 34 [2] 21 [3] 2 [4] 10 [5] 6 Hits@level+ = [0+] 127 [1+] 73 [2+] 39 [3+] 18 [4+] 16 [5+] 6 Hits/KSLOC@level+ = [0+] 48.3625 [1+] 27.7989 [2+] 14.8515 [3+] 6.85453 [4+] 6.09292 [5+] 2.28484 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.