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/motion-4.3.2/src/alg.c Examining data/motion-4.3.2/src/alg.h Examining data/motion-4.3.2/src/conf.c Examining data/motion-4.3.2/src/conf.h Examining data/motion-4.3.2/src/draw.c Examining data/motion-4.3.2/src/event.c Examining data/motion-4.3.2/src/event.h Examining data/motion-4.3.2/src/ffmpeg.c Examining data/motion-4.3.2/src/ffmpeg.h Examining data/motion-4.3.2/src/jpegutils.c Examining data/motion-4.3.2/src/jpegutils.h Examining data/motion-4.3.2/src/logger.c Examining data/motion-4.3.2/src/logger.h Examining data/motion-4.3.2/src/md5.c Examining data/motion-4.3.2/src/md5.h Examining data/motion-4.3.2/src/mmalcam.c Examining data/motion-4.3.2/src/mmalcam.h Examining data/motion-4.3.2/src/mmx.h Examining data/motion-4.3.2/src/motion.c Examining data/motion-4.3.2/src/motion.h Examining data/motion-4.3.2/src/netcam.c Examining data/motion-4.3.2/src/netcam.h Examining data/motion-4.3.2/src/netcam_ftp.c Examining data/motion-4.3.2/src/netcam_ftp.h Examining data/motion-4.3.2/src/netcam_http.c Examining data/motion-4.3.2/src/netcam_http.h Examining data/motion-4.3.2/src/netcam_jpeg.c Examining data/motion-4.3.2/src/netcam_rtsp.c Examining data/motion-4.3.2/src/netcam_rtsp.h Examining data/motion-4.3.2/src/netcam_wget.c Examining data/motion-4.3.2/src/netcam_wget.h Examining data/motion-4.3.2/src/picture.c Examining data/motion-4.3.2/src/picture.h Examining data/motion-4.3.2/src/pwc-ioctl.h Examining data/motion-4.3.2/src/raspicam/RaspiCLI.c Examining data/motion-4.3.2/src/raspicam/RaspiCLI.h Examining data/motion-4.3.2/src/raspicam/RaspiCamControl.c Examining data/motion-4.3.2/src/raspicam/RaspiCamControl.h Examining data/motion-4.3.2/src/rotate.c Examining data/motion-4.3.2/src/rotate.h Examining data/motion-4.3.2/src/stream.c Examining data/motion-4.3.2/src/stream.h Examining data/motion-4.3.2/src/track.c Examining data/motion-4.3.2/src/track.h Examining data/motion-4.3.2/src/translate.c Examining data/motion-4.3.2/src/translate.h Examining data/motion-4.3.2/src/video_bktr.c Examining data/motion-4.3.2/src/video_bktr.h Examining data/motion-4.3.2/src/video_common.c Examining data/motion-4.3.2/src/video_common.h Examining data/motion-4.3.2/src/video_loopback.c Examining data/motion-4.3.2/src/video_loopback.h Examining data/motion-4.3.2/src/video_v4l2.c Examining data/motion-4.3.2/src/video_v4l2.h Examining data/motion-4.3.2/src/webu.c Examining data/motion-4.3.2/src/webu.h Examining data/motion-4.3.2/src/webu_html.c Examining data/motion-4.3.2/src/webu_html.h Examining data/motion-4.3.2/src/webu_stream.c Examining data/motion-4.3.2/src/webu_stream.h Examining data/motion-4.3.2/src/webu_text.c Examining data/motion-4.3.2/src/webu_text.h FINAL RESULTS: data/motion-4.3.2/src/conf.c:1990:17: [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(cnt->conf_filename, optarg); data/motion-4.3.2/src/conf.c:2270:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(value, "%s", sysconfdir"/conf.d"); data/motion-4.3.2/src/conf.c:2272:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(value, "%s", "value"); data/motion-4.3.2/src/conf.c:2695:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parmname_new,"%s","\"power line frequency\""); data/motion-4.3.2/src/conf.c:2698:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parmname_new,"%s",dep_config_params[config_indx].name); data/motion-4.3.2/src/conf.c:2707:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(orig_parm,"%s",cnt[i]->conf.vid_control_params); data/motion-4.3.2/src/conf.c:2713:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cnt[i]->conf.vid_control_params,"%s=%s,%s",parmname_new, config_val, orig_parm); data/motion-4.3.2/src/conf.c:2718:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cnt[i]->conf.vid_control_params,"%s=%s", parmname_new, config_val); data/motion-4.3.2/src/conf.c:2997:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(retval + strlen(retval), "camera %s\n", cnt[i]->conf_filename); data/motion-4.3.2/src/conf.c:3123:5: [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(cnt[i]->conf_filename, str); data/motion-4.3.2/src/event.c:95:9: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", stamp, " &", NULL); data/motion-4.3.2/src/event.c:836:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(cnt->conf.target_dir, W_OK)!= 0) { data/motion-4.3.2/src/event.c:873:24: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. cnt->extpipe = popen(cnt->extpipecmdline, "we"); data/motion-4.3.2/src/ffmpeg.c:1386:9: [4] (format) vsnprintf: 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. vsnprintf(buf, sizeof(buf), fmt, vl); data/motion-4.3.2/src/logger.c:236:10: [4] (format) vsnprintf: 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. n += vsnprintf(buf + n, sizeof(buf) - n, usrfmt, ap); data/motion-4.3.2/src/mmalcam.c:45:5: [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(control_params_tok, control_params_str); data/motion-4.3.2/src/motion.c:2661:13: [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(msg, part); data/motion-4.3.2/src/motion.c:2664:17: [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(msg, part); data/motion-4.3.2/src/motion.c:2668:13: [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(msg, part); data/motion-4.3.2/src/motion.c:2673:13: [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(msg, part); data/motion-4.3.2/src/motion.c:2678:13: [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(msg, part); data/motion-4.3.2/src/motion.c:3935:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(out, "%*s", width, VERSION); data/motion-4.3.2/src/netcam.c:81:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parse_url->host, "%s","????"); data/motion-4.3.2/src/netcam.c:82:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parse_url->service, "%s","????"); data/motion-4.3.2/src/netcam.c:83:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parse_url->path, "%s","INVALID"); data/motion-4.3.2/src/netcam.c:84:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(parse_url->userpass, "%s","INVALID"); data/motion-4.3.2/src/netcam_http.c:1273:9: [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(userpass, ptr); data/motion-4.3.2/src/netcam_http.c:1300:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. ix += sprintf(request_pass, connect_auth_req, encuserpass); data/motion-4.3.2/src/netcam_http.c:1326:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)ptr, "http://%s:%d%s", url->host, url->port , url->path); data/motion-4.3.2/src/netcam_http.c:1329:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)ptr, "http://%s%s", url->host, url->path); data/motion-4.3.2/src/netcam_http.c:1383:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(netcam->connect_request, connect_req, ptr, data/motion-4.3.2/src/netcam_http.c:1387:9: [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(netcam->connect_request, connect_req_keepalive); data/motion-4.3.2/src/netcam_http.c:1389:9: [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(netcam->connect_request, connect_req_close); data/motion-4.3.2/src/netcam_http.c:1393:9: [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(netcam->connect_request, request_pass); data/motion-4.3.2/src/netcam_rtsp.c:849:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfmt, "%s","mjpeg"); data/motion-4.3.2/src/netcam_rtsp.c:852:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfmt, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:856:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfmt, "%s","h264"); data/motion-4.3.2/src/netcam_rtsp.c:859:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfmt, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:862:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfmt, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:877:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfps, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:878:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optsize, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:881:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optfps, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:882:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(optsize, "%s","default"); data/motion-4.3.2/src/netcam_rtsp.c:931:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rtsp_data->path, "%s",url.path); data/motion-4.3.2/src/netcam_rtsp.c:936:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rtsp_data->path, "%s",url.path); data/motion-4.3.2/src/netcam_rtsp.c:941:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(url.service, "%s","http"); data/motion-4.3.2/src/netcam_rtsp.c:951:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)rtsp_data->path, "%s://%s@%s:%d%s", data/motion-4.3.2/src/netcam_rtsp.c:956:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *)rtsp_data->path, "%s://%s:%d%s", url.service, data/motion-4.3.2/src/netcam_rtsp.c:961:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(rtsp_data->service, "%s",url.service); data/motion-4.3.2/src/stream.c:194:9: [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(response, sizeof(response), bad_method_response_template_raw); data/motion-4.3.2/src/stream.c:263:9: [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(userpass, p->conf->stream_authentication); data/motion-4.3.2/src/track.c:1358:9: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", fmtcmd, " &", NULL); data/motion-4.3.2/src/video_common.c:495:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp[indx].ctrl_name,"%s",vdevctx->usrctrl_array[indx].ctrl_name); data/motion-4.3.2/src/video_common.c:507:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vdevctx->usrctrl_array[vdevctx->usrctrl_count].ctrl_name,"%s",config_name); data/motion-4.3.2/src/video_v4l2.c:236:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(curdev->devctrl_array[indx_ctrl].ctrl_name,"%s",vid_ctrl.name); data/motion-4.3.2/src/video_v4l2.c:257:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(curdev->devctrl_array[indx_ctrl].ctrl_name,"%s",vid_menu.name); data/motion-4.3.2/src/video_v4l2.c:1643:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fourcc,"%s","NULL"); data/motion-4.3.2/src/video_v4l2.c:1645:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fourcc,"%s",palette_array[v4l2_palette].fourcc); data/motion-4.3.2/src/video_v4l2.c:1652:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fourcc,"%s","NULL"); data/motion-4.3.2/src/conf.c:1986:17: [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 ((c = getopt(conf->argc, conf->argv, "bc:d:hmns?p:k:l:")) != EOF) data/motion-4.3.2/src/conf.c:2379:64: [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. snprintf(filename, PATH_MAX, "%s/.motion/motion.conf", getenv("HOME")); data/motion-4.3.2/src/stream.c:498:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/motion-4.3.2/src/webu.c:113:40: [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. snprintf(webui->lang_full, 6,"%s", getenv("LANGUAGE")); data/motion-4.3.2/src/webu.c:1021:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/motion-4.3.2/src/webu.c:1811:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/motion-4.3.2/src/webu.c:1892:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/motion-4.3.2/src/alg.c:608:14: [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. unsigned char window[3], blob, latest; data/motion-4.3.2/src/alg.c:617:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(row3, img, width); data/motion-4.3.2/src/alg.c:633:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(row3, yp+width, width); data/motion-4.3.2/src/alg.c:700:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(row3, img, width); data/motion-4.3.2/src/alg.c:716:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(row3, yp + width, width); data/motion-4.3.2/src/alg.c:763:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row3, img, width); data/motion-4.3.2/src/alg.c:766:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row1, Row2, width); data/motion-4.3.2/src/alg.c:767:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row2, Row3, width); data/motion-4.3.2/src/alg.c:772:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row3, img + (y+1) * width, width); data/motion-4.3.2/src/alg.c:807:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row3, img, width); data/motion-4.3.2/src/alg.c:810:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row1, Row2, width); data/motion-4.3.2/src/alg.c:811:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row2, Row3, width); data/motion-4.3.2/src/alg.c:816:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Row3, img + (y + 1) * width, width); data/motion-4.3.2/src/alg.c:1301:13: [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 tmp[80]; data/motion-4.3.2/src/alg.c:1302:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d %d", lines, vertlines); data/motion-4.3.2/src/alg.c:1370:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->imgs.ref, cnt->imgs.image_vprvcy.image_norm, cnt->imgs.size_norm); data/motion-4.3.2/src/alg.h:30:9: [2] (misc) open: 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). int open; data/motion-4.3.2/src/conf.c:2004:48: [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). cnt->log_level = (unsigned int)atoi(optarg); data/motion-4.3.2/src/conf.c:2140: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 line[PATH_MAX], *cmd = NULL, *arg1 = NULL; data/motion-4.3.2/src/conf.c:2226: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. char timestamp[32]; data/motion-4.3.2/src/conf.c:2267:21: [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 value[PATH_MAX]; data/motion-4.3.2/src/conf.c:2310: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 filename[PATH_MAX]; data/motion-4.3.2/src/conf.c:2320:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&cnt[0]->conf, &conf_template, sizeof(struct config)); data/motion-4.3.2/src/conf.c:2356:12: [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"); data/motion-4.3.2/src/conf.c:2360: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. char path[PATH_MAX]; data/motion-4.3.2/src/conf.c:2375:14: [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"); data/motion-4.3.2/src/conf.c:2380:14: [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"); data/motion-4.3.2/src/conf.c:2384:18: [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"); data/motion-4.3.2/src/conf.c:2574:16: [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. tmp = (char *)cnt[i]+(int)val_ptr; data/motion-4.3.2/src/conf.c:2604:16: [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. tmp = (char *)cnt[i]+val_ptr; data/motion-4.3.2/src/conf.c:2610:29: [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). *((int *)tmp) = atoi(str); data/motion-4.3.2/src/conf.c:2638:16: [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. tmp = (char **)((char *)cnt[i] + val_ptr); data/motion-4.3.2/src/conf.c:2638:26: [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. tmp = (char **)((char *)cnt[i] + val_ptr); data/motion-4.3.2/src/conf.c:2686:15: [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). parmval = atoi(config_val); data/motion-4.3.2/src/conf.c:2740:16: [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. tmp = (char *)cnt[i]+(int)val_ptr; data/motion-4.3.2/src/conf.c:2768:16: [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. tmp = (char *)cnt[i]+(int)val_ptr; data/motion-4.3.2/src/conf.c:2910:18: [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. *(int*)((char *)cnt[threadnr] + val) == *(int*)((char *)cnt[0] + val)) data/motion-4.3.2/src/conf.c:2910:58: [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. *(int*)((char *)cnt[threadnr] + val) == *(int*)((char *)cnt[0] + val)) data/motion-4.3.2/src/conf.c:2913:18: [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. if (*(int*)((char *)cnt[threadnr] + val)) data/motion-4.3.2/src/conf.c:2937:20: [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. cptr0 = (const char **)((char *)cnt[0] + val); data/motion-4.3.2/src/conf.c:2937:30: [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. cptr0 = (const char **)((char *)cnt[0] + val); data/motion-4.3.2/src/conf.c:2938:20: [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. cptr1 = (const char **)((char *)cnt[threadnr] + val); data/motion-4.3.2/src/conf.c:2938:30: [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. cptr1 = (const char **)((char *)cnt[threadnr] + val); data/motion-4.3.2/src/conf.c:2959:12: [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 retval[20]; data/motion-4.3.2/src/conf.c:2963:18: [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. *(int*)((char *)cnt[threadnr] + val) == *(int*)((char *)cnt[0] + val)) data/motion-4.3.2/src/conf.c:2963:58: [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. *(int*)((char *)cnt[threadnr] + val) == *(int*)((char *)cnt[0] + val)) data/motion-4.3.2/src/conf.c:2966:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(retval, "%d", *(int*)((char *)cnt[threadnr] + val)); data/motion-4.3.2/src/conf.c:2966:36: [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. sprintf(retval, "%d", *(int*)((char *)cnt[threadnr] + val)); data/motion-4.3.2/src/conf.c:3018: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 conf_file[PATH_MAX]; data/motion-4.3.2/src/conf.c:3083: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(str, "r"); data/motion-4.3.2/src/conf.c:3108:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt[i], cnt[0], sizeof(struct context)); data/motion-4.3.2/src/draw.c:18:10: [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. unsigned char *char_arr_ptr[ASCII_MAX]; data/motion-4.3.2/src/draw.c:22:14: [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. unsigned char pix[8][7]; data/motion-4.3.2/src/event.c:79: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 stamp[PATH_MAX]; data/motion-4.3.2/src/event.c:296: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. char sqlquery[PATH_MAX]; data/motion-4.3.2/src/event.c:320: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. char sqlquery[PATH_MAX]; data/motion-4.3.2/src/event.c:344: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. char sqlquery[PATH_MAX]; data/motion-4.3.2/src/event.c:517: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 fullfilename[PATH_MAX]; data/motion-4.3.2/src/event.c:518: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 filename[PATH_MAX]; data/motion-4.3.2/src/event.c:556: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 fullfilenamem[PATH_MAX]; data/motion-4.3.2/src/event.c:557: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 filename[PATH_MAX]; data/motion-4.3.2/src/event.c:558: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 filenamem[PATH_MAX]; data/motion-4.3.2/src/event.c:593: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 fullfilename[PATH_MAX]; data/motion-4.3.2/src/event.c:594: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 filename[PATH_MAX]; data/motion-4.3.2/src/event.c:595: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 filepath[PATH_MAX]; data/motion-4.3.2/src/event.c:603: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. char linkpath[PATH_MAX]; data/motion-4.3.2/src/event.c:672: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 previewname[PATH_MAX]; data/motion-4.3.2/src/event.c:673: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 filename[PATH_MAX]; data/motion-4.3.2/src/event.c:815: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. char stamp[PATH_MAX] = ""; data/motion-4.3.2/src/event.c:938: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 stamp[PATH_MAX]; data/motion-4.3.2/src/event.c:1124: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. char tmp[PATH_MAX]; data/motion-4.3.2/src/ffmpeg.c:203:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ffmpeg->nal_info, &ffmpeg->pkt.data[0], ffmpeg->nal_info_len); data/motion-4.3.2/src/ffmpeg.c:211:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ffmpeg->pkt.data[0], ffmpeg->nal_info, ffmpeg->nal_info_len); data/motion-4.3.2/src/ffmpeg.c:219:12: [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). file = fopen(fname, "r"); data/motion-4.3.2/src/ffmpeg.c:231:12: [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). file = fopen(ffmpeg->filename, "a"); data/motion-4.3.2/src/ffmpeg.c:304: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 basename[PATH_MAX]; data/motion-4.3.2/src/ffmpeg.c:317:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(codec_name, ffmpeg->codec_name, codec_name_len); data/motion-4.3.2/src/ffmpeg.c:441: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:479: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:656:13: [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 crf[10]; data/motion-4.3.2/src/ffmpeg.c:761: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:889: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:968: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:1006: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:1072: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:1181: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 errstr[128]; data/motion-4.3.2/src/ffmpeg.c:1375: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 buf[1024]; data/motion-4.3.2/src/ffmpeg.c:1411:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ffmpeg->picture->data[0], image, ffmpeg->ctx_codec->width * ffmpeg->ctx_codec->height); data/motion-4.3.2/src/jpegutils.c:107:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*htblptr)->bits, bits, sizeof((*htblptr)->bits)); data/motion-4.3.2/src/jpegutils.c:122:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*htblptr)->huffval, val, nsymbols * sizeof(UINT8)); data/motion-4.3.2/src/jpegutils.c:307: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 buffer[JMSG_LENGTH_MAX]; data/motion-4.3.2/src/jpegutils.c:336: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 buffer[JMSG_LENGTH_MAX]; data/motion-4.3.2/src/logger.c:139:12: [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 buffer[16]; data/motion-4.3.2/src/logger.c:172: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 buf[1024]; data/motion-4.3.2/src/logger.c:173: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 usrfmt[1024]; data/motion-4.3.2/src/logger.c:177: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 msg_buf[100]; data/motion-4.3.2/src/logger.c:183:12: [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 flood_msg[1024]; data/motion-4.3.2/src/logger.c:184: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 flood_repeats[1024]; data/motion-4.3.2/src/logger.c:205: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 threadname[32]; data/motion-4.3.2/src/md5.c:58:17: [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 unsigned char PADDING[64] = { data/motion-4.3.2/src/md5.c:163:14: [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. unsigned char digest[16], /* message digest */ data/motion-4.3.2/src/md5.c:166:12: [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. unsigned char bits[8]; data/motion-4.3.2/src/md5.c:192:10: [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. unsigned char block[64]; data/motion-4.3.2/src/md5.c:336:4: [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 *)output)[i] = (char)value; data/motion-4.3.2/src/md5.h:69:12: [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. unsigned char buffer[64]; /* input buffer */ data/motion-4.3.2/src/mmalcam.c:399:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(img_data->image_norm, camera_buffer->data, cnt->imgs.size_norm); data/motion-4.3.2/src/mmx.h:21: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 b[8]; /* 8 Byte (8-bit) values */ data/motion-4.3.2/src/mmx.h:22:14: [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. unsigned char ub[8]; /* 8 Unsigned Byte */ data/motion-4.3.2/src/motion.c:116:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, cnt->imgs.image_ring, sizeof(struct image_data) * smallest); data/motion-4.3.2/src/motion.c:201:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&cnt->imgs.preview_image, img, sizeof(struct image_data)); data/motion-4.3.2/src/motion.c:208:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->imgs.preview_image.image_norm, img->image_norm, cnt->imgs.size_norm); data/motion-4.3.2/src/motion.c:210:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->imgs.preview_image.image_high, img->image_high, cnt->imgs.size_high); data/motion-4.3.2/src/motion.c:267:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&cnt->track, &track_template, sizeof(struct trackoptions)); data/motion-4.3.2/src/motion.c:621:17: [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 tmp[32]; data/motion-4.3.2/src/motion.c:668:29: [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 tmp[25]; data/motion-4.3.2/src/motion.c:671:29: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "Fillerframes %d", frames); data/motion-4.3.2/src/motion.c:1107:13: [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 connstring[255]; data/motion-4.3.2/src/motion.c:2053: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 tmpout[80]; data/motion-4.3.2/src/motion.c:2089:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->imgs.image_virgin.image_norm, cnt->current_image->image_norm, cnt->imgs.size_norm); data/motion-4.3.2/src/motion.c:2093:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->imgs.image_vprvcy.image_norm, cnt->current_image->image_norm, cnt->imgs.size_norm); data/motion-4.3.2/src/motion.c:2116:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->current_image->image_norm, cnt->imgs.image_virgin.image_norm, cnt->imgs.size_norm); data/motion-4.3.2/src/motion.c:2168:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cnt->current_image->image_norm, cnt->imgs.image_vprvcy.image_norm, cnt->imgs.size_norm); data/motion-4.3.2/src/motion.c:2403: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 tmp[PATH_MAX]; data/motion-4.3.2/src/motion.c:2432:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", cnt->current_image->diffs); data/motion-4.3.2/src/motion.c:2445:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "D:%5d L:%3d N:%3d", cnt->current_image->diffs, data/motion-4.3.2/src/motion.c:2450:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "THREAD %d SETUP", cnt->threadnr); data/motion-4.3.2/src/motion.c:2655: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. char msg[1024] = "\0"; data/motion-4.3.2/src/motion.c:2656: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. char part[100]; data/motion-4.3.2/src/motion.c:3065:14: [2] (misc) open: 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). if ((i = open("/dev/tty", O_RDWR)) >= 0) { data/motion-4.3.2/src/motion.c:3071:9: [2] (misc) open: 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). i = open("/dev/null", O_RDONLY); data/motion-4.3.2/src/motion.c:3078:9: [2] (misc) open: 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). i = open("/dev/null", O_WRONLY); data/motion-4.3.2/src/motion.c:3366: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 service[6]; data/motion-4.3.2/src/motion.c:3842:19: [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). FILE *dummy = fopen(path, mode); data/motion-4.3.2/src/motion.c:3854:17: [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). dummy = fopen(path, mode); data/motion-4.3.2/src/motion.c:3927:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "%*d", width, cnt->movie_fps); data/motion-4.3.2/src/motion.c:3931:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "%*llu", width, cnt->database_event_id); data/motion-4.3.2/src/motion.c:3972: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 formatstring[PATH_MAX] = ""; data/motion-4.3.2/src/motion.c:3973: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 tempstring[PATH_MAX] = ""; data/motion-4.3.2/src/motion.c:4012:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%0*d", width ? width : 2, cnt->event_nr); data/motion-4.3.2/src/motion.c:4016:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%0*d", width ? width : 2, data/motion-4.3.2/src/motion.c:4021:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->current_image->diffs); data/motion-4.3.2/src/motion.c:4025:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->noise); data/motion-4.3.2/src/motion.c:4029:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, data/motion-4.3.2/src/motion.c:4034:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, data/motion-4.3.2/src/motion.c:4039:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->current_image->location.x); data/motion-4.3.2/src/motion.c:4043:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->current_image->location.y); data/motion-4.3.2/src/motion.c:4047:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->threshold); data/motion-4.3.2/src/motion.c:4051:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, data/motion-4.3.2/src/motion.c:4056:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->camera_id); data/motion-4.3.2/src/motion.c:4068:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->imgs.width); data/motion-4.3.2/src/motion.c:4072:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->imgs.height); data/motion-4.3.2/src/motion.c:4077:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, cnt->movie_fps); data/motion-4.3.2/src/motion.c:4090:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempstr, "%*d", width, sqltype); data/motion-4.3.2/src/motion.c:4148: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 tname[16]; data/motion-4.3.2/src/motion.c:4172: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 currname[16]; data/motion-4.3.2/src/motion.h:367: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 conf_filename[PATH_MAX]; data/motion-4.3.2/src/motion.h:371: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 pid_file[PATH_MAX]; data/motion-4.3.2/src/motion.h:372: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 log_file[PATH_MAX]; data/motion-4.3.2/src/motion.h:373: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 log_type_str[6]; data/motion-4.3.2/src/motion.h:427: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 text_event_string[PATH_MAX]; /* The text for conv. spec. %C - */ data/motion-4.3.2/src/motion.h:455: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 hostname[PATH_MAX]; data/motion-4.3.2/src/motion.h:473: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 newfilename[PATH_MAX]; data/motion-4.3.2/src/motion.h:474: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 extpipefilename[PATH_MAX]; data/motion-4.3.2/src/motion.h:475: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 extpipecmdline[PATH_MAX]; data/motion-4.3.2/src/motion.h:483: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 timelapsefilename[PATH_MAX]; data/motion-4.3.2/src/motion.h:484: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 motionfilename[PATH_MAX]; data/motion-4.3.2/src/motion.h:516: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 webcontrol_digest_rand[8]; data/motion-4.3.2/src/motion.h:517: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 webstream_digest_rand[8]; data/motion-4.3.2/src/netcam.c:150:43: [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). parse_url->port = atoi(s); data/motion-4.3.2/src/netcam.c:620: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 err_service[6]; data/motion-4.3.2/src/netcam_ftp.c:266: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 buf[200]; data/motion-4.3.2/src/netcam_ftp.c:292: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 buf[200]; data/motion-4.3.2/src/netcam_ftp.c:326: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 buf[200]; data/motion-4.3.2/src/netcam_ftp.c:398:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((struct sockaddr_in *)&ctxt->ftp_address)->sin_addr, hp->h_addr_list[0], hp->h_length); data/motion-4.3.2/src/netcam_ftp.c:504: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 buf[200], *cur; data/motion-4.3.2/src/netcam_ftp.c:508:14: [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. unsigned char ad[6], *adp, *portp; data/motion-4.3.2/src/netcam_ftp.c:585:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((struct sockaddr_in *)&data_address)->sin_addr, &ad[0], 4); data/motion-4.3.2/src/netcam_ftp.c:586:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((struct sockaddr_in *)&data_address)->sin_port, &ad[4], 2); data/motion-4.3.2/src/netcam_ftp.c:727: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 buf[300]; data/motion-4.3.2/src/netcam_ftp.c:801: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 buf[100], utype; data/motion-4.3.2/src/netcam_ftp.c:974:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(netcam->ftp->user, ptr,(cptr - ptr)); data/motion-4.3.2/src/netcam_ftp.h:28: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 control_buffer[FTP_BUF_SIZE + 1]; data/motion-4.3.2/src/netcam_http.c:665: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 port[15]; data/motion-4.3.2/src/netcam_http.c:666:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(port,"%u",netcam->connect_port); data/motion-4.3.2/src/netcam_http.c:1399:5: [2] (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 string. strcat(netcam->connect_request, "\r\n"); data/motion-4.3.2/src/netcam_http.c:1656:5: [2] (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). Risk is low because the source is a constant string. strcpy(url->service, "http"); /* Put back a real URL service. */ data/motion-4.3.2/src/netcam_http.c:1747:39: [2] (misc) open: 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). netcam->file->control_file_desc = open(netcam->file->path, O_RDONLY|O_CLOEXEC); data/motion-4.3.2/src/netcam_http.h:24: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 mh_magic[MJPG_MH_MAGIC_SIZE]; /* must contain the string MJP data/motion-4.3.2/src/netcam_http.h:34: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 mh_reserved[30]; /* Unknown data, seems to be data/motion-4.3.2/src/netcam_jpeg.c:214: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 buffer[JMSG_LENGTH_MAX]; data/motion-4.3.2/src/netcam_rtsp.c:138:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, rtsp_data->pktarray, sizeof(struct packet_item) * rtsp_data->pktarray_size); data/motion-4.3.2/src/netcam_rtsp.c:164: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:225: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:272: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:334: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:508: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:594: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:838: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 optsize[10], optfmt[10], optfps[10]; data/motion-4.3.2/src/netcam_rtsp.c:871:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(optfps, "%d",rtsp_data->framerate); data/motion-4.3.2/src/netcam_rtsp.c:874:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(optsize, "%dx%d",rtsp_data->imgsize.width,rtsp_data->imgsize.height); data/motion-4.3.2/src/netcam_rtsp.c:1123: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 errstr[128]; data/motion-4.3.2/src/netcam_rtsp.c:1610:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(img_data->image_norm data/motion-4.3.2/src/netcam_rtsp.c:1623:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(img_data->image_high data/motion-4.3.2/src/netcam_rtsp.h:68: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 service[5]; /* String specifying the type of camera http, rtsp, v4l2 */ data/motion-4.3.2/src/netcam_rtsp.h:70: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 cameratype[30]; /* String specifying Normal or High for use in logging */ data/motion-4.3.2/src/netcam_rtsp.h:85: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 threadname[16]; /* The thread name*/ data/motion-4.3.2/src/netcam_wget.c:222:18: [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 const char tbl[64] = { data/motion-4.3.2/src/netcam_wget.c:261:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (res, beg, end - beg); data/motion-4.3.2/src/netcam_wget.c:343:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(where, netcam->response->buffer_pos, howmuch); data/motion-4.3.2/src/netcam_wget.c:368:12: [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). return atoi(cptr + 1); data/motion-4.3.2/src/netcam_wget.h:34: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 buffer[4096]; /* the input buffer */ data/motion-4.3.2/src/picture.c:57:14: [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 const char exif_marker_start[14] = { data/motion-4.3.2/src/picture.c:63:14: [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 const char exif_version_tag[12] = { data/motion-4.3.2/src/picture.c:70:14: [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 const char exif_subifd_tag[8] = { data/motion-4.3.2/src/picture.c:76:14: [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 const char exif_tzoffset_tag[12] = { data/motion-4.3.2/src/picture.c:114:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(into->buf, data, length); data/motion-4.3.2/src/picture.c:125:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(into->base + offset, data, length); data/motion-4.3.2/src/picture.c:171: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 datetime_buf[22]; data/motion-4.3.2/src/picture.c:172: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 tmpbuf[45]; data/motion-4.3.2/src/picture.c:274:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(marker, exif_marker_start, 14); /* EXIF and TIFF headers */ data/motion-4.3.2/src/picture.c:296:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(writing.buf, exif_subifd_tag, 8); data/motion-4.3.2/src/picture.c:302:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(writing.buf, exif_tzoffset_tag, 12); data/motion-4.3.2/src/picture.c:315:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(writing.buf + 2, exif_version_tag, 12); /* tag 0x9000 */ data/motion-4.3.2/src/picture.c:554:14: [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. unsigned char rgb[3]; data/motion-4.3.2/src/picture.c:843: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 line[256]; data/motion-4.3.2/src/pwc-ioctl.h:98: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 name[32]; data/motion-4.3.2/src/pwc-ioctl.h:104: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 serial[30]; /* String with serial number. Contains terminating 0 */ data/motion-4.3.2/src/pwc-ioctl.h:200:14: [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. unsigned char command_buf[13]; /* Actual USB video command */ data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1693:7: [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 tmp[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V4]; data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1831:4: [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 response[80] = ""; data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1845:4: [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 response[80] = ""; data/motion-4.3.2/src/raspicam/RaspiCamControl.h:163:4: [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 annotate_string[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2]; /// String to use for annotate - overrides certain bitmask settings data/motion-4.3.2/src/rotate.c:376:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(img, temp_buff, size); data/motion-4.3.2/src/rotate.c:387:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(img, temp_buff, size); data/motion-4.3.2/src/stream.c:73: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 host[NI_MAXHOST]; data/motion-4.3.2/src/stream.c:118: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 method[10] = {'\0'}; data/motion-4.3.2/src/stream.c:119: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 url[512] = {'\0'}; data/motion-4.3.2/src/stream.c:120: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 protocol[10] = {'\0'}; data/motion-4.3.2/src/stream.c:193: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. char response[1024]; data/motion-4.3.2/src/stream.c:221: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 buffer[1024] = {'\0'}; data/motion-4.3.2/src/stream.c:269:13: [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 host[NI_MAXHOST] = "unknown"; data/motion-4.3.2/src/stream.c:317: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. typedef char HASH[HASHLEN]; data/motion-4.3.2/src/stream.c:319: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. typedef char HASHHEX[HASHHEXLEN+1]; data/motion-4.3.2/src/stream.c:446: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 buffer[1024] = {'\0'}; data/motion-4.3.2/src/stream.c:451: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 server_nonce[SERVER_NONCE_LEN]; data/motion-4.3.2/src/stream.c:453: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 server_uri[SERVER_URI_LEN]; data/motion-4.3.2/src/stream.c:638:13: [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 host[NI_MAXHOST] = "unknown"; data/motion-4.3.2/src/stream.c:1058:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new->tmpbuffer->ptr, base_header, BASE_HEADER_LEN); data/motion-4.3.2/src/stream.c:1076:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new->tmpbuffer->ptr, base_header, BASE_HEADER_LEN-2); data/motion-4.3.2/src/stream.c:1077:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&new->tmpbuffer->ptr[BASE_HEADER_LEN-2], cors_header_key, cors_header_key_len); data/motion-4.3.2/src/stream.c:1078:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&new->tmpbuffer->ptr[BASE_HEADER_LEN-2 + cors_header_key_len], list->cors_header, cors_header_len); data/motion-4.3.2/src/stream.c:1079:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&new->tmpbuffer->ptr[BASE_HEADER_LEN-2 + cors_header_key_len + cors_header_len], "\r\n\r\n", 4); data/motion-4.3.2/src/stream.c:1174:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(stm->cors_header, cors_header, size); data/motion-4.3.2/src/stream.c:1246: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 len[20]; /* Will be used for sprintf, must be >= 16 */ data/motion-4.3.2/src/stream.c:1319:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(wptr, jpeghead, headlength); data/motion-4.3.2/src/stream.c:1329:23: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. imgsize = sprintf(len, "%9ld\r\n\r\n", tmpbuffer->size); data/motion-4.3.2/src/stream.c:1330:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(wptr - imgsize, len, imgsize); data/motion-4.3.2/src/stream.c:1333:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(wptr + tmpbuffer->size, "\r\n", 2); data/motion-4.3.2/src/track.c:158: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 buffer[3]; data/motion-4.3.2/src/track.c:197:31: [2] (misc) open: 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). if ((cnt->track.dev = open(cnt->track.port, O_RDWR|O_CLOEXEC | O_NOCTTY)) < 0) { data/motion-4.3.2/src/track.c:319:27: [2] (misc) open: 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). if ((cnt->track.dev = open(cnt->track.port, O_RDWR|O_CLOEXEC | O_NOCTTY)) < 0) { data/motion-4.3.2/src/track.c:352:14: [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. unsigned char buffer[3]; data/motion-4.3.2/src/track.c:654: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 buffer[1]; data/motion-4.3.2/src/track.c:674: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 command[3]; data/motion-4.3.2/src/track.c:686: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 command[2]; data/motion-4.3.2/src/track.c:697: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 command[5], direction = 0; data/motion-4.3.2/src/track.c:700:31: [2] (misc) open: 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). if ((cnt->track.dev = open(cnt->track.port, O_RDWR|O_CLOEXEC | O_NOCTTY)) < 0) { data/motion-4.3.2/src/track.c:761: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 command[5]; data/motion-4.3.2/src/track.c:1310: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 fmtcmd[PATH_MAX]; data/motion-4.3.2/src/track.c:1318: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. char buf[12]; data/motion-4.3.2/src/track.c:1329:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", xoff); setenv("TRACK_XOFF", buf, 1); data/motion-4.3.2/src/track.c:1330:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", yoff); setenv("TRACK_YOFF", buf, 1); data/motion-4.3.2/src/track.c:1335:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->x); setenv("TRACK_CENT_X", buf, 1); data/motion-4.3.2/src/track.c:1336:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->y); setenv("TRACK_CENT_Y", buf, 1); data/motion-4.3.2/src/track.c:1337:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->width); setenv("TRACK_CENT_WIDTH", buf, 1); data/motion-4.3.2/src/track.c:1338:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->height); setenv("TRACK_CENT_HEIGHT", buf, 1); data/motion-4.3.2/src/track.c:1339:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->minx); setenv("TRACK_CENT_MINX", buf, 1); data/motion-4.3.2/src/track.c:1340:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->maxx); setenv("TRACK_CENT_MAXX", buf, 1); data/motion-4.3.2/src/track.c:1341:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->miny); setenv("TRACK_CENT_MINY", buf, 1); data/motion-4.3.2/src/track.c:1342:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", cent->maxy); setenv("TRACK_CENT_MAXY", buf, 1); data/motion-4.3.2/src/track.c:1345:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", imgs->width); setenv("TRACK_IMGS_WIDTH", buf, 1); data/motion-4.3.2/src/track.c:1346:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", imgs->height); setenv("TRACK_IMGS_HEIGHT", buf, 1); data/motion-4.3.2/src/track.c:1347:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", imgs->motionsize); setenv("TRACK_IMGS_MOTIONSIZE", buf, 1); data/motion-4.3.2/src/video_bktr.c:613:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(map, cap_map, ((width*height*3)/2)); data/motion-4.3.2/src/video_bktr.c:868:17: [2] (misc) open: 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). fd_device = open(conf->video_device, O_RDWR|O_CLOEXEC); data/motion-4.3.2/src/video_bktr.c:880:24: [2] (misc) open: 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). bktr_fdtuner = open(conf->tuner_device, O_RDWR|O_CLOEXEC); data/motion-4.3.2/src/video_common.c:481:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(map, cap_map, (width*height)); data/motion-4.3.2/src/video_common.c:508:63: [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). vdevctx->usrctrl_array[vdevctx->usrctrl_count].ctrl_value=atoi(config_val); data/motion-4.3.2/src/video_common.h:47:14: [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. unsigned char *bktr_buffers[2]; data/motion-4.3.2/src/video_loopback.c:24: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 pipepath[255]; data/motion-4.3.2/src/video_loopback.c:25: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 buffer[255]; data/motion-4.3.2/src/video_loopback.c:50:23: [2] (misc) open: 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). if ((fd = open(buffer, O_RDONLY|O_CLOEXEC)) >= 0) { data/motion-4.3.2/src/video_loopback.c:61:23: [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). min = atoi(&buffer[21]); data/motion-4.3.2/src/video_loopback.c:73:28: [2] (misc) open: 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). if ((tfd = open(buffer, O_RDWR|O_CLOEXEC)) >= 0) { data/motion-4.3.2/src/video_loopback.c:161:15: [2] (misc) open: 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). dev = open(dev_name, O_RDWR|O_CLOEXEC); data/motion-4.3.2/src/video_v4l2.c:79: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 fourcc[5]; data/motion-4.3.2/src/video_v4l2.c:111:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(palette_array[indx].fourcc ,"%c%c%c%c" data/motion-4.3.2/src/video_v4l2.c:239:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(curdev->devctrl_array[indx_ctrl].ctrl_iddesc,"ID%08d",vid_ctrl.id); data/motion-4.3.2/src/video_v4l2.c:260:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(curdev->devctrl_array[indx_ctrl].ctrl_iddesc,"menu item: Value %d",indx); data/motion-4.3.2/src/video_v4l2.c:400: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 cid_exp[15],cid_expabs[15],cid_bright[15]; data/motion-4.3.2/src/video_v4l2.c:413:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cid_bright,"ID%08d",V4L2_CID_BRIGHTNESS); data/motion-4.3.2/src/video_v4l2.c:414:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cid_exp,"ID%08d",V4L2_CID_EXPOSURE); data/motion-4.3.2/src/video_v4l2.c:415:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cid_expabs,"ID%08d",V4L2_CID_EXPOSURE_ABSOLUTE); data/motion-4.3.2/src/video_v4l2.c:1082:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(map, the_buffer->ptr, the_buffer->content_length); data/motion-4.3.2/src/video_v4l2.c:1229:17: [2] (misc) open: 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). fd_device = open(curdev->video_device, O_RDWR|O_CLOEXEC); data/motion-4.3.2/src/video_v4l2.c:1593:29: [2] (misc) open: 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). vid_source->fd_device = open(video_device, O_RDWR|O_CLOEXEC); data/motion-4.3.2/src/video_v4l2.c:1679:29: [2] (misc) open: 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). vid_source->fd_device = open(video_device, O_RDWR|O_CLOEXEC); data/motion-4.3.2/src/webu.c:218:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(temp_resp, webui->resp_page, webui->resp_size); data/motion-4.3.2/src/webu.c:222:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(webui->resp_page, temp_resp, webui->resp_size); data/motion-4.3.2/src/webu.c:227:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(webui->resp_page + webui->resp_used, buf, resp_len); data/motion-4.3.2/src/webu.c:250:33: [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). webui->thread_nbr = atoi(webui->uri_camid); data/motion-4.3.2/src/webu.c:615: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 temp_name[WEBUI_LEN_PARM]; data/motion-4.3.2/src/webu.c:723:22: [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). cent.x = atoi(webui->uri_value1); data/motion-4.3.2/src/webu.c:732:22: [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). cent.y = atoi(webui->uri_value2); data/motion-4.3.2/src/webu.c:740:19: [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). , atoi(webui->uri_value1), atoi(webui->uri_value2)); data/motion-4.3.2/src/webu.c:740:44: [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). , atoi(webui->uri_value1), atoi(webui->uri_value2)); data/motion-4.3.2/src/webu.c:760: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 client[WEBUI_LEN_URLI]; data/motion-4.3.2/src/webu.c:1554:18: [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). infile = fopen(fname, "rb"); data/motion-4.3.2/src/webu.h:42: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 hostproto[6]; /* Protocol for host http or https */ data/motion-4.3.2/src/webu_html.c:44: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 lnk_ref[WEBUI_LEN_LNK]; data/motion-4.3.2/src/webu_html.c:45: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 lnk_src[WEBUI_LEN_LNK]; data/motion-4.3.2/src/webu_html.c:46: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 lnk_camid[WEBUI_LEN_LNK]; data/motion-4.3.2/src/webu_html.c:47: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 proto[WEBUI_LEN_LNK]; data/motion-4.3.2/src/webu_html.c:54: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:79: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:128: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:151: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:212: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:232: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:249: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:312: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:346: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:370: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:394: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:426: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:534: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:630: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:700: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:762: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:838: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:907: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:934: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:951: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:968: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:989: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1035: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1051: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1090: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1139: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1169: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1193: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_html.c:1211: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_stream.c:66: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 resp_head[80]; data/motion-4.3.2/src/webu_stream.c:106:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(webui->resp_page, resp_head, header_len); data/motion-4.3.2/src/webu_stream.c:107:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(webui->resp_page + header_len data/motion-4.3.2/src/webu_stream.c:111:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(webui->resp_page + header_len + jpeg_size,"\r\n",2); data/motion-4.3.2/src/webu_stream.c:150:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, webui->resp_page + webui->stream_pos, sent_bytes); data/motion-4.3.2/src/webu_stream.c:174:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(webui->resp_page data/motion-4.3.2/src/webu_stream.c:301: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 resp_used[20]; data/motion-4.3.2/src/webu_text.c:38: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:57: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:70: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:84: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:96: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:112: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:136: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:170: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:202: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:254: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:317: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:365: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:392: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:440: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:459: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:481: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:503: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:525: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:547: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:568: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:590: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:612: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:675: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:702: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:729: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:753: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:774: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:797: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:819: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:867: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:870: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 temp_name[WEBUI_LEN_PARM]; data/motion-4.3.2/src/webu_text.c:946: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/webu_text.c:982: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 response[WEBUI_LEN_RESP]; data/motion-4.3.2/src/alg.c:844: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 done = 0, i, len = strlen(cnt->conf.despeckle_filter); data/motion-4.3.2/src/conf.c:34: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). #define stripnewline(x) {if ((x)[strlen(x)-1]=='\n') (x)[strlen(x) - 1] = 0; } data/motion-4.3.2/src/conf.c:34:58: [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). #define stripnewline(x) {if ((x)[strlen(x)-1]=='\n') (x)[strlen(x) - 1] = 0; } data/motion-4.3.2/src/conf.c:2008:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cnt->log_type_str, optarg, sizeof(cnt->log_type_str) - 1); data/motion-4.3.2/src/conf.c:2014:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cnt->pid_file, optarg, sizeof(cnt->pid_file) - 1); data/motion-4.3.2/src/conf.c:2020:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cnt->log_file, optarg, sizeof(cnt->log_file) - 1); data/motion-4.3.2/src/conf.c:2144:51: [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 (!(line[0] == '#' || line[0] == ';' || strlen(line) < 2)) {/* skipcomment */ data/motion-4.3.2/src/conf.c:2149:26: [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). end = line + strlen(line) - 1; /* Point to the last non-null character in the string. */ data/motion-4.3.2/src/conf.c:2156:17: [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 (strlen(line) == 0) data/motion-4.3.2/src/conf.c:2175:17: [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 (strlen(beg) > 0) { data/motion-4.3.2/src/conf.c:2185:43: [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 ((beg[0] == '"' && beg[strlen(beg)-1] == '"') || data/motion-4.3.2/src/conf.c:2186:44: [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). (beg[0] == '\'' && beg[strlen(beg)-1] == '\'')) { data/motion-4.3.2/src/conf.c:2187:25: [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). beg[strlen(beg)-1] = '\0'; data/motion-4.3.2/src/conf.c:2260:25: [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 (strlen(val) > 0) data/motion-4.3.2/src/conf.c:2354:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename, cnt[0]->conf_filename, PATH_MAX-1); data/motion-4.3.2/src/conf.c:2373: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). , (int)(PATH_MAX-1-strlen("/motion.conf")) data/motion-4.3.2/src/conf.c:2694: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). parmname_new = mymalloc(strlen(dep_config_params[config_indx].name) + 3); data/motion-4.3.2/src/conf.c:2697: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). parmname_new = mymalloc(strlen(dep_config_params[config_indx].name)+1); data/motion-4.3.2/src/conf.c:2704:23: [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). parmnew_len = strlen(parmname_new) + strlen(config_val) + 2; /*Add for = and /0*/ data/motion-4.3.2/src/conf.c:2704: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). parmnew_len = strlen(parmname_new) + strlen(config_val) + 2; /*Add for = and /0*/ data/motion-4.3.2/src/conf.c:2706: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). orig_parm = mymalloc(strlen(cnt[i]->conf.vid_control_params)+1); data/motion-4.3.2/src/conf.c:2709:27: [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). parmnew_len = strlen(orig_parm) + parmnew_len + 1; /*extra 1 for the comma */ data/motion-4.3.2/src/conf.c:2856:26: [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 (from == NULL || !strlen(from)) { data/motion-4.3.2/src/conf.c:2859:24: [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). stringlength = strlen(from); data/motion-4.3.2/src/conf.c:2862:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, from, stringlength); data/motion-4.3.2/src/conf.c:2995:36: [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). retval = myrealloc(retval, strlen(retval) + strlen(cnt[i]->conf_filename) + 10, data/motion-4.3.2/src/conf.c:2995:53: [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). retval = myrealloc(retval, strlen(retval) + strlen(cnt[i]->conf_filename) + 10, data/motion-4.3.2/src/conf.c:2997:26: [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). sprintf(retval + strlen(retval), "camera %s\n", cnt[i]->conf_filename); data/motion-4.3.2/src/conf.c:3025:24: [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). name_len = strlen(ep->d_name); data/motion-4.3.2/src/conf.c:3026: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). if (name_len > strlen(EXTENSION) && data/motion-4.3.2/src/conf.c:3028:58: [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). (ep->d_name + name_len - strlen(EXTENSION)), data/motion-4.3.2/src/conf.c:3029: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). strlen(EXTENSION)) == 0 data/motion-4.3.2/src/draw.c:1141:31: [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 (txtlen == 0) txtlen = strlen(text); data/motion-4.3.2/src/draw.c:1171:53: [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). draw_textn(image, startx, starty, width, begin, strlen(begin), factor); data/motion-4.3.2/src/event.c:170:9: [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 (strlen(sqlquery) <= 0) { data/motion-4.3.2/src/event.c:535: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). , (int)(PATH_MAX-2-strlen(filename)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:535:49: [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)(PATH_MAX-2-strlen(filename)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:537: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). , (int)(PATH_MAX-2-strlen(cnt->conf.target_dir)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:537:61: [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)(PATH_MAX-2-strlen(cnt->conf.target_dir)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:576: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). , (int)(PATH_MAX-1-strlen(filename)) data/motion-4.3.2/src/event.c:579: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). , (int)(PATH_MAX-2-strlen(filenamem)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:579:50: [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)(PATH_MAX-2-strlen(filenamem)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:581: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). , (int)(PATH_MAX-2-strlen(cnt->conf.target_dir)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:581:61: [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)(PATH_MAX-2-strlen(cnt->conf.target_dir)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:597:15: [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(cnt->conf.snapshot_filename); data/motion-4.3.2/src/event.c:616: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). , (int)(PATH_MAX-1-strlen(filepath)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:616:49: [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)(PATH_MAX-1-strlen(filepath)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:619: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). , (int)(PATH_MAX-1-strlen(filename)) data/motion-4.3.2/src/event.c:621: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). , (int)(PATH_MAX-1-strlen(cnt->conf.target_dir)) data/motion-4.3.2/src/event.c:631:30: [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)(PATH_MAX-strlen("/lastsnap.")-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:631:51: [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)(PATH_MAX-strlen("/lastsnap.")-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:644: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). , (int)(PATH_MAX-1-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:647: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). , (int)(PATH_MAX-1-strlen(filename)) data/motion-4.3.2/src/event.c:649: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). , (int)(PATH_MAX-1-strlen(cnt->conf.target_dir)) data/motion-4.3.2/src/event.c:699:44: [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). retcd = snprintf(filename, strlen(cnt->newfilename) - 2 data/motion-4.3.2/src/event.c:741:36: [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)(PATH_MAX-2-strlen(filename)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:741:53: [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)(PATH_MAX-2-strlen(filename)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:743:36: [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)(PATH_MAX-2-strlen(cnt->conf.target_dir)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:743:65: [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)(PATH_MAX-2-strlen(cnt->conf.target_dir)-strlen(imageext(cnt))) data/motion-4.3.2/src/event.c:831: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). , (int)(PATH_MAX-5-strlen(stamp)) data/motion-4.3.2/src/event.c:833: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). , (int)(PATH_MAX-5-strlen(cnt->conf.target_dir)) data/motion-4.3.2/src/event.c:1013: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). , (int)(PATH_MAX-7-strlen(stamp)-strlen(codec)) data/motion-4.3.2/src/event.c:1013: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). , (int)(PATH_MAX-7-strlen(stamp)-strlen(codec)) data/motion-4.3.2/src/event.c:1015: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). , (int)(PATH_MAX-7-strlen(cnt->conf.target_dir)-strlen(codec)) data/motion-4.3.2/src/event.c:1015:61: [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)(PATH_MAX-7-strlen(cnt->conf.target_dir)-strlen(codec)) data/motion-4.3.2/src/event.c:1018: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). , (int)(PATH_MAX-6-strlen(stamp)-strlen(codec)) data/motion-4.3.2/src/event.c:1018: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). , (int)(PATH_MAX-6-strlen(stamp)-strlen(codec)) data/motion-4.3.2/src/event.c:1020: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). , (int)(PATH_MAX-6-strlen(cnt->conf.target_dir)-strlen(codec)) data/motion-4.3.2/src/event.c:1020:61: [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)(PATH_MAX-6-strlen(cnt->conf.target_dir)-strlen(codec)) data/motion-4.3.2/src/event.c:1024: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). , (int)(PATH_MAX-6-strlen(stamp)) data/motion-4.3.2/src/event.c:1026: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). , (int)(PATH_MAX-6-strlen(cnt->conf.target_dir)) data/motion-4.3.2/src/event.c:1029: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). , (int)(PATH_MAX-5-strlen(stamp)) data/motion-4.3.2/src/event.c:1031: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). , (int)(PATH_MAX-5-strlen(cnt->conf.target_dir)) data/motion-4.3.2/src/event.c:1142: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). , (int)(PATH_MAX-5-strlen(tmp)) data/motion-4.3.2/src/event.c:1144: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). , (int)(PATH_MAX-5-strlen(cnt->conf.target_dir)) data/motion-4.3.2/src/ffmpeg.c:1387:21: [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). end = buf + strlen(buf); data/motion-4.3.2/src/logger.c:242:24: [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). size_t buf_len = strlen(buf); data/motion-4.3.2/src/logger.c:250:7: [1] (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 low because the source is a constant string. strncat(buf, ": ", 1024 - buf_len); data/motion-4.3.2/src/logger.c:262:9: [1] (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. strncat(buf, strerror_r(errno_save, msg_buf, sizeof(msg_buf)), 1024 - strlen(buf)); data/motion-4.3.2/src/logger.c:262:79: [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). strncat(buf, strerror_r(errno_save, msg_buf, sizeof(msg_buf)), 1024 - strlen(buf)); data/motion-4.3.2/src/logger.c:275:17: [1] (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 low because the source is a constant character. strncat(flood_repeats, "\n", 1024 - strlen(flood_repeats)); data/motion-4.3.2/src/logger.c:275:53: [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). strncat(flood_repeats, "\n", 1024 - strlen(flood_repeats)); data/motion-4.3.2/src/logger.c:282:17: [1] (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 low because the source is a constant character. strncat(flood_repeats, "\n", 1024 - strlen(flood_repeats)); data/motion-4.3.2/src/logger.c:282:53: [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). strncat(flood_repeats, "\n", 1024 - strlen(flood_repeats)); data/motion-4.3.2/src/logger.c:292:13: [1] (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 low because the source is a constant character. strncat(buf, "\n", 1024 - strlen(buf)); data/motion-4.3.2/src/logger.c:292:39: [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). strncat(buf, "\n", 1024 - strlen(buf)); data/motion-4.3.2/src/logger.c:299:13: [1] (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 low because the source is a constant character. strncat(buf, "\n", 1024 - strlen(buf)); data/motion-4.3.2/src/logger.c:299:39: [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). strncat(buf, "\n", 1024 - strlen(buf)); data/motion-4.3.2/src/mmalcam.c:44:39: [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). char *control_params_tok = alloca(strlen(control_params_str) + 1); data/motion-4.3.2/src/motion.c:1293:40: [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). cnt->netcam_decoder = mymalloc(strlen(cnt->conf.netcam_decoder)+1); data/motion-4.3.2/src/motion.c:1294: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). retcd = snprintf(cnt->netcam_decoder,strlen(cnt->conf.netcam_decoder)+1 data/motion-4.3.2/src/motion.c:1828:13: [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). j = strlen(cnt->conf.area_detect); data/motion-4.3.2/src/motion.c:2434:13: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(tmp, "-"); data/motion-4.3.2/src/motion.c:3920: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). #define SPECIFIERWORD(k) ((strlen(k)==l) && (!strncmp (k, word, l))) data/motion-4.3.2/src/netcam.c:64:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(match, input + m.rm_so, len); data/motion-4.3.2/src/netcam_ftp.c:276:11: [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). len = strlen(buf); data/motion-4.3.2/src/netcam_ftp.c:302:11: [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). len = strlen(buf); data/motion-4.3.2/src/netcam_ftp.c:333:11: [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). len = strlen(buf); data/motion-4.3.2/src/netcam_ftp.c:542:15: [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). len = strlen (buf); data/motion-4.3.2/src/netcam_ftp.c:636:15: [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). len = strlen(buf); data/motion-4.3.2/src/netcam_ftp.c:743:11: [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). len = strlen(buf); data/motion-4.3.2/src/netcam_ftp.c:806:11: [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). len = strlen(buf); data/motion-4.3.2/src/netcam_http.c:67:15: [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). len = strlen(str) - 1; data/motion-4.3.2/src/netcam_http.c:249:21: [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 (strlen(header) == 0) { data/motion-4.3.2/src/netcam_http.c:346: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). strlen(netcam->connect_request), 0) < 0) { data/motion-4.3.2/src/netcam_http.c:454:48: [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). netcam->boundary_length = strlen(netcam->boundary); data/motion-4.3.2/src/netcam_http.c:1272: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). userpass = mymalloc(strlen(ptr) + 3); data/motion-4.3.2/src/netcam_http.c:1294: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). encuserpass = mymalloc(BASE64_LENGTH(strlen(userpass)) + 1); data/motion-4.3.2/src/netcam_http.c:1296:53: [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). motion_base64_encode(userpass, encuserpass, strlen(userpass)); data/motion-4.3.2/src/netcam_http.c:1298: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). request_pass = mymalloc(strlen(connect_auth_req) + data/motion-4.3.2/src/netcam_http.c:1299: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). strlen(encuserpass) + 1); data/motion-4.3.2/src/netcam_http.c:1325: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). ptr = mymalloc(strlen(url->service) + strlen(url->host) + 7 + strlen(url->path) + 4); data/motion-4.3.2/src/netcam_http.c:1325:51: [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). ptr = mymalloc(strlen(url->service) + strlen(url->host) + 7 + strlen(url->path) + 4); data/motion-4.3.2/src/netcam_http.c:1325:75: [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). ptr = mymalloc(strlen(url->service) + strlen(url->host) + 7 + strlen(url->path) + 4); data/motion-4.3.2/src/netcam_http.c:1328: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). ptr = mymalloc(strlen(url->service) + strlen(url->host) + strlen(url->path) + 4); data/motion-4.3.2/src/netcam_http.c:1328:51: [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). ptr = mymalloc(strlen(url->service) + strlen(url->host) + strlen(url->path) + 4); data/motion-4.3.2/src/netcam_http.c:1328:71: [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). ptr = mymalloc(strlen(url->service) + strlen(url->host) + strlen(url->path) + 4); data/motion-4.3.2/src/netcam_http.c:1350:11: [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). ix += strlen(ptr); data/motion-4.3.2/src/netcam_http.c:1360:15: [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). ix += strlen(connect_req_keepalive); data/motion-4.3.2/src/netcam_http.c:1362:15: [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). ix += strlen(connect_req_close); data/motion-4.3.2/src/netcam_http.c:1379:40: [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). netcam->connect_request = mymalloc(strlen(connect_req) + ix + data/motion-4.3.2/src/netcam_http.c:1380:31: [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). strlen(netcam->connect_host)); data/motion-4.3.2/src/netcam_http.c:1754:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((len = read(netcam->file->control_file_desc, data/motion-4.3.2/src/netcam_rtsp.c:930:36: [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). rtsp_data->path = mymalloc(strlen(url.path) + 1); data/motion-4.3.2/src/netcam_rtsp.c:935:36: [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). rtsp_data->path = mymalloc(strlen(url.path) + 1); data/motion-4.3.2/src/netcam_rtsp.c:949:40: [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). rtsp_data->path = mymalloc(strlen(url.service) + 3 + strlen(userpass) data/motion-4.3.2/src/netcam_rtsp.c:949:66: [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). rtsp_data->path = mymalloc(strlen(url.service) + 3 + strlen(userpass) data/motion-4.3.2/src/netcam_rtsp.c:950:25: [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). + 1 + strlen(url.host) + 6 + strlen(url.path) + 2 ); data/motion-4.3.2/src/netcam_rtsp.c:950:48: [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). + 1 + strlen(url.host) + 6 + strlen(url.path) + 2 ); data/motion-4.3.2/src/netcam_rtsp.c:954:40: [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). rtsp_data->path = mymalloc(strlen(url.service) + 3 + strlen(url.host) data/motion-4.3.2/src/netcam_rtsp.c:954:66: [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). rtsp_data->path = mymalloc(strlen(url.service) + 3 + strlen(url.host) data/motion-4.3.2/src/netcam_rtsp.c:955:25: [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). + 6 + strlen(url.path) + 2); data/motion-4.3.2/src/netcam_wget.c:277:19: [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). p = hdr + strlen (hdr); data/motion-4.3.2/src/picture.c:132: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). unsigned stringlength = strlen(str) + (with_nul?1:0); data/motion-4.3.2/src/picture.c:221:25: [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). datasize += 5 + strlen(description); /* Add 5 for NUL and alignment */ data/motion-4.3.2/src/picture.c:236:30: [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). datasize += 2 * (5 + strlen(datetime)); data/motion-4.3.2/src/picture.c:241:25: [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). datasize += 5 + strlen(subtime); data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1708:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(annotate.text, string, MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3); data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1715:13: [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(strlen(annotate.text)) data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1723:10: [1] (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. strncat(annotate.text, tmp, MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 - strlen(annotate.text) - 1); data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1723:77: [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). strncat(annotate.text, tmp, MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 - strlen(annotate.text) - 1); data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1728:13: [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(strlen(annotate.text)) data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1736:10: [1] (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. strncat(annotate.text, tmp, MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 - strlen(annotate.text) - 1); data/motion-4.3.2/src/raspicam/RaspiCamControl.c:1736:77: [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). strncat(annotate.text, tmp, MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 - strlen(annotate.text) - 1); data/motion-4.3.2/src/stream.c:141:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readb = read(sock, buffer+nread, buflen - nread); data/motion-4.3.2/src/stream.c:165:62: [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). ret = write(sock, timeout_response_template_raw, strlen(timeout_response_template_raw)); data/motion-4.3.2/src/stream.c:174:11: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. ret = sscanf(buffer, "%9s %511s %9s", method, url, protocol); data/motion-4.3.2/src/stream.c:195:37: [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). ret = write(sock, response, strlen (response)); data/motion-4.3.2/src/stream.c:257: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). size_t auth_size = strlen(p->conf->stream_authentication); data/motion-4.3.2/src/stream.c:300:56: [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 (write(p->sock, request_auth_response_template, strlen (request_auth_response_template)) < 0) data/motion-4.3.2/src/stream.c:364:54: [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). MD5Update(&Md5Ctx, (unsigned char *)pszUserName, strlen(pszUserName)); data/motion-4.3.2/src/stream.c:366:51: [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). MD5Update(&Md5Ctx, (unsigned char *)pszRealm, strlen(pszRealm)); data/motion-4.3.2/src/stream.c:368:54: [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). MD5Update(&Md5Ctx, (unsigned char *)pszPassword, strlen(pszPassword)); data/motion-4.3.2/src/stream.c:375:55: [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). MD5Update(&Md5Ctx, (unsigned char *)pszNonce, strlen(pszNonce)); data/motion-4.3.2/src/stream.c:377:56: [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). MD5Update(&Md5Ctx, (unsigned char *)pszCNonce, strlen(pszCNonce)); data/motion-4.3.2/src/stream.c:406:52: [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). MD5Update(&Md5Ctx, (unsigned char *)pszMethod, strlen(pszMethod)); data/motion-4.3.2/src/stream.c:408:55: [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). MD5Update(&Md5Ctx, (unsigned char *)pszDigestUri, strlen(pszDigestUri)); data/motion-4.3.2/src/stream.c:421:51: [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). MD5Update(&Md5Ctx, (unsigned char *)pszNonce, strlen(pszNonce)); data/motion-4.3.2/src/stream.c:425:60: [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). MD5Update(&Md5Ctx, (unsigned char *)pszNonceCount, strlen(pszNonceCount)); data/motion-4.3.2/src/stream.c:427:56: [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). MD5Update(&Md5Ctx, (unsigned char *)pszCNonce, strlen(pszCNonce)); data/motion-4.3.2/src/stream.c:429:53: [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). MD5Update(&Md5Ctx, (unsigned char *)pszQop, strlen(pszQop)); data/motion-4.3.2/src/stream.c:517:16: [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). len_pass = strlen(h); data/motion-4.3.2/src/stream.c:654:37: [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). KEEP_ALIVE_TIMEOUT, strlen(auth_failed_html_template)); data/motion-4.3.2/src/stream.c:655:36: [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 (write(p->sock, buffer, strlen(buffer)) < 0) data/motion-4.3.2/src/stream.c:658:55: [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 (write(p->sock, auth_failed_html_template, strlen(auth_failed_html_template)) < 0) data/motion-4.3.2/src/stream.c:691:49: [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 (write(p->sock, internal_error_template, strlen(internal_error_template)) < 0) data/motion-4.3.2/src/stream.c:1037:25: [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). #define BASE_HEADER_LEN strlen(base_header) data/motion-4.3.2/src/stream.c:1065:38: [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). size_t cors_header_key_len = strlen(cors_header_key); data/motion-4.3.2/src/stream.c:1066: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). size_t cors_header_len = strlen(list->cors_header); data/motion-4.3.2/src/stream.c:1167:23: [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). size_t size = strlen(cors_header) + 1; data/motion-4.3.2/src/track.c:172:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(cnt->track.dev, buffer, 1) != 1 && time(NULL) < timeout + 1); data/motion-4.3.2/src/track.c:371:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(cnt->track.dev, buffer, 1) != 1 && time(NULL) < timeout + 1); data/motion-4.3.2/src/track.c:661:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(cnt->track.dev, buffer, 1) != 1 && time(NULL) < timeout + 2); data/motion-4.3.2/src/video_common.c:494:40: [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). tmp[indx].ctrl_name = mymalloc(strlen(vdevctx->usrctrl_array[indx].ctrl_name)+1); data/motion-4.3.2/src/video_common.c:506:73: [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). vdevctx->usrctrl_array[vdevctx->usrctrl_count].ctrl_name = mymalloc(strlen(config_name)+1); data/motion-4.3.2/src/video_loopback.c:51:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((len = read(fd, buffer, sizeof(buffer)-1)) < 0) { data/motion-4.3.2/src/video_loopback.c:74:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pipepath, buffer, sizeof(pipepath)); data/motion-4.3.2/src/webu.c:209:16: [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). resp_len = strlen(buf); data/motion-4.3.2/src/webu.c:244:9: [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 (strlen(webui->uri_camid) > 0){ data/motion-4.3.2/src/webu.c:246: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). for (indx=0; indx < (int)strlen(webui->uri_camid);indx++){ data/motion-4.3.2/src/webu.c:321:24: [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). parm_len = strlen(webui->url) - parm_len; data/motion-4.3.2/src/webu.c:338: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). parm_len = strlen(webui->url) - parm_len; data/motion-4.3.2/src/webu.c:352: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). parm_len = strlen(webui->url) - parm_len; data/motion-4.3.2/src/webu.c:366: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). parm_len = strlen(webui->url) - parm_len; data/motion-4.3.2/src/webu.c:417:9: [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 (strlen(webui->url) == 0) return -1; data/motion-4.3.2/src/webu.c:424:9: [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 (strlen(webui->url) == 1) return 0; data/motion-4.3.2/src/webu.c:436:20: [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). parm_len = strlen(webui->url); data/motion-4.3.2/src/webu.c:449:24: [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). parm_len = strlen(webui->url) - parm_len ; data/motion-4.3.2/src/webu.c:463:24: [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). parm_len = strlen(webui->url) - parm_len; data/motion-4.3.2/src/webu.c:474:10: [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). (strlen(webui->uri_cmd2) > 0)) { data/motion-4.3.2/src/webu.c:647:13: [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 (strlen(webui->uri_parm1) > 0){ data/motion-4.3.2/src/webu.c:861:48: [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(webui->auth_denied) data/motion-4.3.2/src/webu.c:922:48: [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(webui->auth_denied) data/motion-4.3.2/src/webu.c:977:20: [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). auth_len = strlen(webui->cnt->conf.webcontrol_authentication); data/motion-4.3.2/src/webu.c:986:52: [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). webui->auth_user = mymalloc(auth_len - strlen(col_pos) + 1); data/motion-4.3.2/src/webu.c:987:41: [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). webui->auth_pass = mymalloc(strlen(col_pos)); data/motion-4.3.2/src/webu.c:988:51: [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). snprintf(webui->auth_user, auth_len - strlen(col_pos) + 1, "%s" data/motion-4.3.2/src/webu.c:990:40: [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). snprintf(webui->auth_pass, strlen(col_pos), "%s", col_pos + 1); data/motion-4.3.2/src/webu.c:993:20: [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). auth_len = strlen(webui->cnt->conf.stream_authentication); data/motion-4.3.2/src/webu.c:1002:52: [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). webui->auth_user = mymalloc(auth_len - strlen(col_pos) + 1); data/motion-4.3.2/src/webu.c:1003:41: [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). webui->auth_pass = mymalloc(strlen(col_pos)); data/motion-4.3.2/src/webu.c:1004:51: [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). snprintf(webui->auth_user, auth_len - strlen(col_pos) + 1, "%s" data/motion-4.3.2/src/webu.c:1006:40: [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). snprintf(webui->auth_pass, strlen(col_pos), "%s", col_pos + 1); data/motion-4.3.2/src/webu.c:1083:49: [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(webui->resp_page) data/motion-4.3.2/src/webu.c:1121:10: [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). (strlen(webui->uri_camid) == 0)) { data/motion-4.3.2/src/webu.c:1140:17: [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). } else if ((strlen(webui->uri_camid) > 0) && data/motion-4.3.2/src/webu.c:1141:10: [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). (strlen(webui->uri_cmd1) == 0)){ data/motion-4.3.2/src/webu.c:1188: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 ((webui->cnt == NULL) || (strlen(webui->url) == 0)){ data/motion-4.3.2/src/webu.c:1196:9: [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 (strlen(webui->clientip) == 0){ data/motion-4.3.2/src/webu.c:1258: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 ((webui->cnt == NULL) || (strlen(webui->url) == 0)){ data/motion-4.3.2/src/webu.c:1269:9: [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 (strlen(webui->clientip) == 0){ data/motion-4.3.2/src/webu_html.c:479:23: [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 (((strlen(val_temp) == 0) && (val_thread == NULL)) || data/motion-4.3.2/src/webu_html.c:480:23: [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). ((strlen(val_temp) != 0) && (val_thread == NULL))) { data/motion-4.3.2/src/webu_html.c:482:30: [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). } else if (((strlen(val_temp) == 0) && (val_thread != NULL)) ) { data/motion-4.3.2/src/webu_html.c:1238:9: [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 (strlen(webui->uri_camid) == 0){ data/motion-4.3.2/src/webu_stream.c:214:37: [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 ((webui->cntlst == NULL) && (strlen(webui->uri_cmd1) > 0)) { data/motion-4.3.2/src/webu_text.c:841:10: [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). (strlen(webui->uri_cmd2) == 0)) { data/motion-4.3.2/src/webu_text.c:845:18: [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). (strlen(webui->uri_cmd2) == 0)) { data/motion-4.3.2/src/webu_text.c:849:18: [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). (strlen(webui->uri_cmd2) == 0)) { data/motion-4.3.2/src/webu_text.c:853:18: [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). (strlen(webui->uri_cmd2) == 0)) { data/motion-4.3.2/src/webu_text.c:1038:9: [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 (strlen(webui->uri_camid) == 0){ data/motion-4.3.2/src/webu_text.c:1045:16: [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). } else if (strlen(webui->uri_cmd1) == 0) { data/motion-4.3.2/src/webu_text.c:1048:16: [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). } else if (strlen(webui->uri_cmd2) == 0) { data/motion-4.3.2/src/webu_text.c:1053:17: [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). (strlen(webui->uri_parm1) == 0)) { data/motion-4.3.2/src/webu_text.c:1058:17: [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). (strlen(webui->uri_parm1) > 0) && data/motion-4.3.2/src/webu_text.c:1059:17: [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). (strlen(webui->uri_value1) == 0) ) { data/motion-4.3.2/src/webu_text.c:1076:17: [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). (strlen(webui->uri_parm1) == 0)) { data/motion-4.3.2/src/webu_text.c:1112:17: [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). (strlen(webui->uri_parm1) == 0)) { ANALYSIS SUMMARY: Hits = 686 Lines analyzed = 39434 in approximately 1.12 seconds (35153 lines/second) Physical Source Lines of Code (SLOC) = 26373 Hits@level = [0] 371 [1] 228 [2] 392 [3] 7 [4] 59 [5] 0 Hits@level+ = [0+] 1057 [1+] 686 [2+] 458 [3+] 66 [4+] 59 [5+] 0 Hits/KSLOC@level+ = [0+] 40.0789 [1+] 26.0115 [2+] 17.3662 [3+] 2.50256 [4+] 2.23714 [5+] 0 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.