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/recordmydesktop-0.3.8.1+svn602/src/rmd_register_callbacks.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_threads.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_register_callbacks.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_setbrwindow.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_load_cache.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_encode_sound_buffer.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_queryextensions.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_capture_sound.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache_frame.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_encode_image_buffer.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_rectinsert.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_wm_check.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_math.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_opendev.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_threads.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_frame.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_wm_is_compositing.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_rectinsert.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_frame.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_yuv_utils.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_flush_to_ogg.h Examining data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert-types.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_wm_check.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_encode_cache.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_encode_image_buffer.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_flush_to_ogg.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_wm_is_compositing.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_opendev.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_timer.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_shortcuts.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_macro.h Examining data/recordmydesktop-0.3.8.1+svn602/src/skeleton.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_get_frame.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache_audio.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_poll_events.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_math.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_getzpixmap.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_load_cache.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_capture_sound.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_timer.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.h Examining data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert-data.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_queryextensions.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_make_dummy_pointer.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_encode_cache.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_setbrwindow.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.h Examining data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_error.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_shortcuts.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_types.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_yuv_utils.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache_frame.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_error.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache_audio.h Examining data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_poll_events.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_make_dummy_pointer.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_get_frame.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.c Examining data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert-data.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_encode_sound_buffer.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_update_image.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_parseargs.h Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_update_image.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_getzpixmap.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c Examining data/recordmydesktop-0.3.8.1+svn602/src/rmd_parseargs.c FINAL RESULTS: data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:53: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(*newname,name); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:56:5: [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(*newname,numbuf); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:96: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(fname,cache_data_t->imgdata); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:170: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(cache_data_t->projname,cache_data_t->workdir); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:173:5: [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(cache_data_t->projname,pidbuf); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:177: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(cache_data_t->imgdata,cache_data_t->projname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:181: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(cache_data_t->audiodata,cache_data_t->projname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:185: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(cache_data_t->specsfile,cache_data_t->projname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:75: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(tname,base_name__); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:79: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(tname,numbuf); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:85: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(*name,tname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:117: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(new_name,pdata->args.filename); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:232: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(args->display, getenv("DISPLAY")); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:241: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(args->device, DEFAULT_AUDIO_DEVICE); data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:104: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(name,num); data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:151:5: [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(rmd_client_name,pidbuf); data/recordmydesktop-0.3.8.1+svn602/src/rmd_parseargs.c:360:21: [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(arg_return->jack_port_names[arg_return->jack_nports - 1], arg); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:63: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(cache_data.projname,path); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:67: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(cache_data.imgdata,cache_data.projname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:71: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(cache_data.audiodata,cache_data.projname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:75: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(cache_data.specsfile,cache_data.projname); data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.c:90:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if(fscanf(fp,"recordMyDesktop = %s\n",Cached_Version)!=1){ data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.c:102:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if(fscanf(fp,"Filename = %s\n",pdata->args.filename)!=1){ data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:25: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. #define snprintf _snprintf data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:25:18: [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. #define snprintf _snprintf data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert.c:126:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(rmdGetPixel(state, x, y) ? "X" : "O"); data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert.c:127:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(x != STATE_WIDTH - 1 ? "," : ""); data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert.c:128:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf((x + 1) % 5 == 0 ? " " : ""); data/recordmydesktop-0.3.8.1+svn602/src/test-rectinsert.c:132:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf((y + 1) % 5 == 0 ? "\n" : ""); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:139: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/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:230:9: [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. if (getenv("DISPLAY") != NULL) { data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:231:48: [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. args->display = (char *) malloc(strlen(getenv("DISPLAY")) + 1); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:232:31: [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. strcpy(args->display, getenv("DISPLAY")); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:52: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 numbuf[8]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:65:15: [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). *ucfp=fopen(newname,"wb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:81:15: [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). *ucfp=fopen(newname,"rb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:134: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 pidbuf[8]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:172: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(cache_data_t->projname,"rMD-session-"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:178: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(cache_data_t->imgdata,"img.out"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:182: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(cache_data_t->audiodata,"audio.pcm"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:186: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(cache_data_t->specsfile,"specs.txt"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:205:30: [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). cache_data_t->uncifp=fopen(cache_data_t->imgdata,"wb0f"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:213:27: [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). cache_data_t->afp=fopen(cache_data_t->audiodata,"wb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache_frame.c:62: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. static unsigned char out_buffer[CACHE_OUT_BUFFER_SIZE]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_error.c:40: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 error_desc[1024]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:73: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 numbuf[8]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:80:9: [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(tname,".ogv"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:118:9: [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(new_name,".ogv"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:131:20: [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). enc_data_t->fp=fopen((pdata)->args.filename,"w"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:244: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(args->workdir, "/tmp"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:247: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(args->pause_shortcut, "Control+Mod1+p"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:250: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(args->stop_shortcut, "Control+Mod1+s"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:253: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(args->filename, "out.ogv"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:100: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 name[64];//recordMyDesktop:input_n<64 is enough for full name data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:101: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 num[8]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:102:9: [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(name,"input_"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:140: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 pidbuf[8]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:141: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 rmd_client_name[32]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_jack.c:148: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(rmd_client_name,"recordMyDesktop-"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_load_cache.c:79: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( &dest[(block_i*width+block_k)*blockwidth+j*width], data/recordmydesktop-0.3.8.1+svn602/src/rmd_load_cache.c:199: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). ucfp=fopen(pdata->cache_data->imgdata,"rb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_load_cache.c:208:13: [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). afp=fopen(pdata->cache_data->audiodata,"rb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_make_dummy_pointer.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 pmask[1][16][16]={{ data/recordmydesktop-0.3.8.1+svn602/src/rmd_make_dummy_pointer.c:66: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 wp[4]={ (wpixel ^ 0xff000000) >> 24, data/recordmydesktop-0.3.8.1+svn602/src/rmd_make_dummy_pointer.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. unsigned char bp[4]={ (bpixel ^ 0xff000000) >> 24, data/recordmydesktop-0.3.8.1+svn602/src/rmd_opendev.c:136:8: [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=open(pcm_dev,O_RDONLY); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:68: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(cache_data.imgdata,"img.out"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:72: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(cache_data.audiodata,"audio.pcm"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:76: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(cache_data.specsfile,"specs.txt"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.c:41:8: [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(pdata->cache_data->specsfile,"wb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.c:77:8: [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(pdata->cache_data->specsfile,"rb"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_specsfile.c:82: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 Cached_Version[256]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_types.h:154: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 *jack_port_names[RMD_MAX_JACK_PORTS]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_types.h:357: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 frame_prefix[4]; //always FRAM data/recordmydesktop-0.3.8.1+svn602/src/rmd_wm_is_compositing.c: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 buf[32]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_yuv_utils.c:34: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 Yr[256], Yg[256], Yb[256], data/recordmydesktop-0.3.8.1+svn602/src/rmd_yuv_utils.h:36: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. extern unsigned char Yr[256], Yg[256], Yb[256], data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:124: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 (op->packet, FISHEAD_IDENTIFIER, 8); /* identifier */ data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:157: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 (op->packet, FISBONE_IDENTIFIER, 8); /* identifier */ data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:167:7: [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((op->packet+FISBONE_SIZE), fp->message_header_fields, fp->current_header_size); data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:190: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(fp->UTC, data+44, 20); data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:223: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(fp->message_header_fields, data+FISBONE_SIZE, fp->current_header_size); data/recordmydesktop-0.3.8.1+svn602/src/skeleton.h:35: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 UTC[20]; data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:54:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(*newname,"."); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:60: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). char *newname=malloc(strlen(name)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:77: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). char *newname=malloc(strlen(name)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:95: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). fname=malloc(strlen(cache_data_t->imgdata)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:167: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). cache_data_t->projname=malloc(strlen(cache_data_t->workdir)+ data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:168: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). 12+strlen(pidbuf)+3); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:171:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(cache_data_t->projname,"/"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:174:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(cache_data_t->projname,"/"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:176: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). cache_data_t->imgdata=malloc(strlen(cache_data_t->projname)+11); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:180: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). cache_data_t->audiodata=malloc(strlen(cache_data_t->projname)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache.c:184: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). cache_data_t->specsfile=malloc(strlen(cache_data_t->projname)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_cache_frame.c:176:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(fheader.frame_prefix,"FRAM",4); data/recordmydesktop-0.3.8.1+svn602/src/rmd_capture_sound.c:49:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(pdata->frametime); data/recordmydesktop-0.3.8.1+svn602/src/rmd_capture_sound.c:137:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int temp_sret=read(pdata->sound_handle, data/recordmydesktop-0.3.8.1+svn602/src/rmd_flush_to_ogg.c:155:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:60:22: [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). fname_length=strlen(*name)-4; data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:63:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(base_name__,*name,fname_length); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:72: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). char *tname=malloc(strlen(*name)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:76:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(tname,"-"); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:84:22: [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=malloc(strlen(tname)+1); data/recordmydesktop-0.3.8.1+svn602/src/rmd_init_encoder.c:106: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). fname_length=strlen(pdata->args.filename); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:231: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). args->display = (char *) malloc(strlen(getenv("DISPLAY")) + 1); data/recordmydesktop-0.3.8.1+svn602/src/rmd_initialize_data.c:240: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). args->device = (char *) malloc(strlen(DEFAULT_AUDIO_DEVICE) + 1); data/recordmydesktop-0.3.8.1+svn602/src/rmd_parseargs.c:313: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). for (k = 0; k < strlen(arg); k++) { data/recordmydesktop-0.3.8.1+svn602/src/rmd_parseargs.c:359:87: [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). arg_return->jack_port_names[arg_return->jack_nports - 1] = malloc(strlen(arg) + 1); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:62: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). cache_data.projname=malloc(strlen(path)+2); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:64:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(cache_data.projname,"/");//having two of these doesn't hurt... data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:66: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). cache_data.imgdata=malloc(strlen(cache_data.projname)+11); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:70: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). cache_data.audiodata=malloc(strlen(cache_data.projname)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_rescue.c:74: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). cache_data.specsfile=malloc(strlen(cache_data.projname)+10); data/recordmydesktop-0.3.8.1+svn602/src/rmd_threads.c:120:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/recordmydesktop-0.3.8.1+svn602/src/rmd_threads.c:142:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/recordmydesktop-0.3.8.1+svn602/src/rmd_timer.c:79:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(usecs_tw); data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:96: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). int this_message_size = strlen(header_key) + strlen(header_value) + 4; data/recordmydesktop-0.3.8.1+svn602/src/skeleton.c:96: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 this_message_size = strlen(header_key) + strlen(header_value) + 4; ANALYSIS SUMMARY: Hits = 118 Lines analyzed = 10468 in approximately 0.35 seconds (30278 lines/second) Physical Source Lines of Code (SLOC) = 6203 Hits@level = [0] 198 [1] 35 [2] 50 [3] 4 [4] 29 [5] 0 Hits@level+ = [0+] 316 [1+] 118 [2+] 83 [3+] 33 [4+] 29 [5+] 0 Hits/KSLOC@level+ = [0+] 50.9431 [1+] 19.0231 [2+] 13.3806 [3+] 5.32001 [4+] 4.67516 [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.