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/openmolcas-19.11/src/Include/cio.h Examining data/openmolcas-19.11/src/Include/compiler_features.h Examining data/openmolcas-19.11/src/Include/digit.h Examining data/openmolcas-19.11/src/Include/err_info.h Examining data/openmolcas-19.11/src/Include/intent.h Examining data/openmolcas-19.11/src/Include/kind_matrix.h Examining data/openmolcas-19.11/src/Include/max_idx_non.h Examining data/openmolcas-19.11/src/Include/max_len_str.h Examining data/openmolcas-19.11/src/Include/mma.h Examining data/openmolcas-19.11/src/Include/molcastype.h Examining data/openmolcas-19.11/src/Include/priunit.h Examining data/openmolcas-19.11/src/Include/stdout.h Examining data/openmolcas-19.11/src/Include/warnings.h Examining data/openmolcas-19.11/src/Include/xkind.h Examining data/openmolcas-19.11/src/espf_util/gmx_wrapper.c Examining data/openmolcas-19.11/src/espf_util/gmx_wrapper.h Examining data/openmolcas-19.11/src/fmm_util/fmm_proc_selector.c Examining data/openmolcas-19.11/src/ga_util/ga_replace_ma.c Examining data/openmolcas-19.11/src/ga_util/nap_time.c Examining data/openmolcas-19.11/src/ga_util/slaveschdir.c Examining data/openmolcas-19.11/src/hdf5_util/mh5_capi.c Examining data/openmolcas-19.11/src/io_util/aixerr.c Examining data/openmolcas-19.11/src/io_util/allocdisk.c Examining data/openmolcas-19.11/src/io_util/cio.c Examining data/openmolcas-19.11/src/io_util/filesystem_wrapper.c Examining data/openmolcas-19.11/src/io_util/zip.c Examining data/openmolcas-19.11/src/misc_util/bytecopy.c Examining data/openmolcas-19.11/src/misc_util/ceil.c Examining data/openmolcas-19.11/src/misc_util/one_ulp.c Examining data/openmolcas-19.11/src/misc_util/rld_r8.c Examining data/openmolcas-19.11/src/misc_util/rle_r8.c Examining data/openmolcas-19.11/src/misc_util/tcd_r8.c Examining data/openmolcas-19.11/src/misc_util/tce_r8.c Examining data/openmolcas-19.11/src/misc_util/tcl_r8.c Examining data/openmolcas-19.11/src/mma_util/cgetmem.c Examining data/openmolcas-19.11/src/mma_util/cgetshmem.c Examining data/openmolcas-19.11/src/mma_util/icloc.c Examining data/openmolcas-19.11/src/mma_util/idloc.c Examining data/openmolcas-19.11/src/mma_util/iiloc.c Examining data/openmolcas-19.11/src/mma_util/illoc.c Examining data/openmolcas-19.11/src/mma_util/isloc.c Examining data/openmolcas-19.11/src/msym_util/msymc.c Examining data/openmolcas-19.11/src/parnell/main.c Examining data/openmolcas-19.11/src/parnell/parnell.c Examining data/openmolcas-19.11/src/parnell/parnell.h Examining data/openmolcas-19.11/src/parnell/parnell_base.c Examining data/openmolcas-19.11/src/parnell/parnell_cmd.c Examining data/openmolcas-19.11/src/parnell/parnell_collect.c Examining data/openmolcas-19.11/src/parnell/parnell_copy.c Examining data/openmolcas-19.11/src/parnell/parnell_exec.c Examining data/openmolcas-19.11/src/parnell/parnell_init.c Examining data/openmolcas-19.11/src/parnell/parnell_reduce.c Examining data/openmolcas-19.11/src/parnell/parnell_remove.c Examining data/openmolcas-19.11/src/parnell/parnell_replica.c Examining data/openmolcas-19.11/src/parnell/parnell_rmlist.c Examining data/openmolcas-19.11/src/parnell/parnell_scatter.c Examining data/openmolcas-19.11/src/parnell/parnell_status.h Examining data/openmolcas-19.11/src/parnell/parnell_translate.c Examining data/openmolcas-19.11/src/parnell/parnell_unlink.c Examining data/openmolcas-19.11/src/parnell/parnell_wipe.c Examining data/openmolcas-19.11/src/property_util/add_infoc.c Examining data/openmolcas-19.11/src/system_util/abendc.c Examining data/openmolcas-19.11/src/system_util/datimx.c Examining data/openmolcas-19.11/src/system_util/fndlnk.c Examining data/openmolcas-19.11/src/system_util/get_genome.c Examining data/openmolcas-19.11/src/system_util/getenvc.c Examining data/openmolcas-19.11/src/system_util/molcas_system.h Examining data/openmolcas-19.11/src/system_util/putenvc.c Examining data/openmolcas-19.11/src/system_util/set_sighandlers.c Examining data/openmolcas-19.11/src/system_util/sighandler.c Examining data/openmolcas-19.11/src/system_util/systemc.c Examining data/openmolcas-19.11/src/system_util/timingc.c Examining data/openmolcas-19.11/src/system_util/unixinfoc.c Examining data/openmolcas-19.11/src/system_util/write_cc.c Examining data/openmolcas-19.11/src/system_util/write_pid.c Examining data/openmolcas-19.11/src/system_util/write_rc.c Examining data/openmolcas-19.11/src/xml_util/xml_cdumpa.c Examining data/openmolcas-19.11/src/xml_util/xml_cdumpb.c Examining data/openmolcas-19.11/src/xml_util/xml_cdumpc.c Examining data/openmolcas-19.11/src/xml_util/xml_cdumps.c Examining data/openmolcas-19.11/src/xml_util/xml_closec.c Examining data/openmolcas-19.11/src/xml_util/xml_ddumpc.c Examining data/openmolcas-19.11/src/xml_util/xml_idumpc.c Examining data/openmolcas-19.11/src/xml_util/xml_openc.c Examining data/openmolcas-19.11/src/xml_util/xml_prspec.c Examining data/openmolcas-19.11/src/xml_util/xmlapi.h FINAL RESULTS: data/openmolcas-19.11/src/system_util/fndlnk.c:48:17: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. INT fnlng=readlink(fnin,fnout,length); data/openmolcas-19.11/src/ga_util/slaveschdir.c:38: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. if (snprintf (s_rank, SRANK_SIZE, INT_FORMAT, *MyRank) == -1) { data/openmolcas-19.11/src/ga_util/slaveschdir.c:48:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (p_subdir, "%s/tmp_%s", p_WorkDir, s_rank); data/openmolcas-19.11/src/io_util/cio.c:69:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void)strcpy(fn,Path); data/openmolcas-19.11/src/io_util/cio.c:110:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void)strcpy(fn,Path); data/openmolcas-19.11/src/io_util/cio.c:225:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void)strcpy(fn,FileName); data/openmolcas-19.11/src/mma_util/cgetmem.c:359: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(dest,src);l2u(dest); data/openmolcas-19.11/src/mma_util/cgetmem.c:731:6: [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(tmp->elbl,lbl); data/openmolcas-19.11/src/mma_util/cgetmem.c:732:6: [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(tmp->etyp,typ); data/openmolcas-19.11/src/parnell/parnell_exec.c:41:26: [4] (shell) execvp: 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. int rc = execvp(*argv, argv); data/openmolcas-19.11/src/parnell/parnell_translate.c:78:33: [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 (dst_name, basename (tmp_name)); data/openmolcas-19.11/src/system_util/fndlnk.c:42:6: [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(fnout,fnin); data/openmolcas-19.11/src/system_util/fndlnk.c:50:7: [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(fntmp,fnout); data/openmolcas-19.11/src/system_util/getenvc.c:98:2: [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,name); data/openmolcas-19.11/src/system_util/getenvc.c:114:12: [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(value,ptr); data/openmolcas-19.11/src/system_util/getenvc.c:164:20: [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(MOLCAS_ENV,line); data/openmolcas-19.11/src/system_util/systemc.c:31:5: [4] (shell) system: 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. int system(const char *); data/openmolcas-19.11/src/system_util/systemc.c:36:2: [4] (shell) system: 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. system(c); data/openmolcas-19.11/src/system_util/systemc.c:46:6: [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",c,(char *)0); data/openmolcas-19.11/src/system_util/systemc.c:58:9: [4] (shell) system: 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. *RCC=system(c); data/openmolcas-19.11/src/system_util/write_cc.c:20:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stream, INT_FORMAT "\n", *code); data/openmolcas-19.11/src/xml_util/xml_ddumpc.c:70:53: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. for(kx=0; kx<nx; kx++) for(ky=0; ky<ny; ky++) fprintf(f,form,data[kx*ny+ky]); data/openmolcas-19.11/src/xml_util/xml_ddumpc.c:74:53: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. for(kx=0; kx<nx; kx++) for(ky=0; ky<ny; ky++) fprintf(f,mform,data[kx*ny+ky]); data/openmolcas-19.11/src/xml_util/xml_ddumpc.c:81:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f,mform,data[kx*ny+ky]); data/openmolcas-19.11/src/xml_util/xml_idumpc.c:56:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fmt," %s",INT_FORMAT); data/openmolcas-19.11/src/xml_util/xml_idumpc.c:57:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mfmt,"<v> %s</v>",INT_FORMAT); data/openmolcas-19.11/src/xml_util/xml_idumpc.c:71:53: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. for(kx=0; kx<nx; kx++) for(ky=0; ky<ny; ky++) fprintf(f,fmt,data[kx*ny+ky]); data/openmolcas-19.11/src/xml_util/xml_idumpc.c:75:53: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. for(kx=0; kx<nx; kx++) for(ky=0; ky<ny; ky++) fprintf(f,mfmt,data[kx*ny+ky]); data/openmolcas-19.11/src/xml_util/xml_idumpc.c:82:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f,fmt,data[kx*ny+ky]); data/openmolcas-19.11/src/parnell/main.c:35: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. char *molcas_nprocs = getenv("MOLCAS_NPROCS"); data/openmolcas-19.11/src/system_util/getenvc.c:110:12: [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. ptr=getenv(name); data/openmolcas-19.11/src/espf_util/gmx_wrapper.c:25: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(log,"a") ; data/openmolcas-19.11/src/ga_util/nap_time.c:39: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[256]; data/openmolcas-19.11/src/ga_util/slaveschdir.c:35: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 s_rank[SRANK_SIZE]; data/openmolcas-19.11/src/io_util/aixerr.c:60:7: [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(s,"Unknown error"); data/openmolcas-19.11/src/io_util/cio.c:42: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). #define open _lopen data/openmolcas-19.11/src/io_util/cio.c:67:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[256]; data/openmolcas-19.11/src/io_util/cio.c:70:7: [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). rc = open(fn,oFlag,0644); data/openmolcas-19.11/src/io_util/cio.c:75:7: [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). rc = open(Path,oFlag,oMode); data/openmolcas-19.11/src/io_util/cio.c:78:5: [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). rc=open(Path,oFlag); data/openmolcas-19.11/src/io_util/cio.c:84: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). rc = open(fn,oFlag); data/openmolcas-19.11/src/io_util/cio.c:87: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). rc = open(Path,oFlag); data/openmolcas-19.11/src/io_util/cio.c:90:7: [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). rc=open(Path,oFlag); data/openmolcas-19.11/src/io_util/cio.c:108:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[256]; data/openmolcas-19.11/src/io_util/cio.c:111:7: [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). rc = open(fn,oFlag,0644); data/openmolcas-19.11/src/io_util/cio.c:116:7: [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). rc = open(Path,oFlag,oMode); data/openmolcas-19.11/src/io_util/cio.c:119:5: [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). rc=open(Path,oFlag); data/openmolcas-19.11/src/io_util/cio.c:221:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[256]; data/openmolcas-19.11/src/io_util/zip.c:149:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_data,&i_value,sizeof(double)); data/openmolcas-19.11/src/io_util/zip.c:161:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_data,&value,sizeof(double)); data/openmolcas-19.11/src/io_util/zip.c:172:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_zip,&zip,sizeof(INT )); data/openmolcas-19.11/src/io_util/zip.c:210:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(&zip,p_zip,sizeof(INT )); data/openmolcas-19.11/src/io_util/zip.c:239:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(&i_value,p_data,sizeof(int)); data/openmolcas-19.11/src/io_util/zip.c:251:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(&value,p_data,sizeof(double)); data/openmolcas-19.11/src/io_util/zip.c:340: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. static char magic[8] = { 0x7f , 'M' , 'O' , 'L' , 'C' , 'A' , 'S' , 0x7f }; data/openmolcas-19.11/src/io_util/zip.c:398: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:406: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:407: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:415: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:416: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:417: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:425: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:426: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:427: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:428: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:436: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. (void)memcpy(p_zip,p_byte_5,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:437: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:438: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:439: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:440: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:448: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. (void)memcpy(p_zip,p_byte_6,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:449: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. (void)memcpy(p_zip,p_byte_5,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:450: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:451: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:452: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:453: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:461: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. (void)memcpy(p_zip,p_byte_7,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:462: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. (void)memcpy(p_zip,p_byte_6,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:463: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. (void)memcpy(p_zip,p_byte_5,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:464: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:465: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:466: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:467: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:475: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. (void)memcpy(p_zip,p_byte_8,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:476: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. (void)memcpy(p_zip,p_byte_7,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:477: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. (void)memcpy(p_zip,p_byte_6,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:478: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. (void)memcpy(p_zip,p_byte_5,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:479: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:480: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:481: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:482: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:490: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. (void)memcpy(p_zip,p_byte_9,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:491: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. (void)memcpy(p_zip,p_byte_8,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:492: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. (void)memcpy(p_zip,p_byte_7,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:493: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. (void)memcpy(p_zip,p_byte_6,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:494: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. (void)memcpy(p_zip,p_byte_5,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:495: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:496: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:497: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:498: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:505: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. (void)memcpy(p_zip,p_byte_10,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:506: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. (void)memcpy(p_zip,p_byte_9,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:507: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. (void)memcpy(p_zip,p_byte_8,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:508: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. (void)memcpy(p_zip,p_byte_7,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:509: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. (void)memcpy(p_zip,p_byte_6,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:510: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. (void)memcpy(p_zip,p_byte_5,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:511: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. (void)memcpy(p_zip,p_byte_4,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:512: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. (void)memcpy(p_zip,p_byte_3,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:513: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. (void)memcpy(p_zip,p_byte_2,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:514: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. (void)memcpy(p_zip,p_byte_1,l_char); p_zip++; data/openmolcas-19.11/src/io_util/zip.c:539: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. static char magic[8] = { 0x7f , 'M' , 'O' , 'L' , 'C' , 'A' , 'S' , 0x7f }; data/openmolcas-19.11/src/io_util/zip.c:596:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_1,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:609:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_2,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:622:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_3,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:635:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_4,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:648:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_5,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:664:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_6,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:680:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_7,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:696:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_8,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:712:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_9,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/io_util/zip.c:728:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(p_byte_10,p_unzip,l_char); p_unzip++; data/openmolcas-19.11/src/misc_util/bytecopy.c:41:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(from,to,(size_t)(*nbytes)); data/openmolcas-19.11/src/misc_util/bytecopy.c:43:6: [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(to,from,(size_t)(*nbytes)); data/openmolcas-19.11/src/misc_util/one_ulp.c:35: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. unsigned char i8[8]; data/openmolcas-19.11/src/misc_util/rle_r8.c:63: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. static unsigned char tab[65536]; data/openmolcas-19.11/src/misc_util/tcd_r8.c:53: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. static unsigned char tab[65536]; data/openmolcas-19.11/src/misc_util/tce_r8.c:54: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. static unsigned char tab[65536]; data/openmolcas-19.11/src/misc_util/tcl_r8.c:54: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. static unsigned char tab[65536]; data/openmolcas-19.11/src/mma_util/cgetmem.c:95: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 elbl[MXLINE]; /* label */ data/openmolcas-19.11/src/mma_util/cgetmem.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 etyp[MXLINE]; /* datatype */ data/openmolcas-19.11/src/mma_util/cgetmem.c:502: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(newe,tmp,sizeof(mentry)); data/openmolcas-19.11/src/mma_util/cgetmem.c:585: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(newe,tmp,sizeof(mentry)); data/openmolcas-19.11/src/mma_util/cgetmem.c:647:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(tgt!=lst) memcpy(tgt,lst,sizeof(mentry)); data/openmolcas-19.11/src/mma_util/cgetmem.c:677: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(tgt,lst,sizeof(mentry)); data/openmolcas-19.11/src/mma_util/cgetmem.c:923: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 e_name[MXLINE]; data/openmolcas-19.11/src/mma_util/cgetmem.c:924: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 e_dtyp[MXLINE]; data/openmolcas-19.11/src/mma_util/cgetmem.c:925: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 action[MXLINE]; data/openmolcas-19.11/src/mma_util/cgetshmem.c:63: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 elbl[MXLINE]; /* label */ data/openmolcas-19.11/src/mma_util/cgetshmem.c:64: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 etyp[MXLINE]; /* datatype */ data/openmolcas-19.11/src/mma_util/cgetshmem.c:243: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 e_name[MXLINE]; data/openmolcas-19.11/src/mma_util/cgetshmem.c:244: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 e_dtyp[MXLINE]; data/openmolcas-19.11/src/mma_util/cgetshmem.c:245: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 action[MXLINE]; data/openmolcas-19.11/src/mma_util/cgetshmem.c:247:28: [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. string2UC(name,e_name);strcat(e_name, "_s"); data/openmolcas-19.11/src/msym_util/msymc.c:77: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[uel+1]; data/openmolcas-19.11/src/msym_util/msymc.c:78: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(buf,uelement[i],uel); data/openmolcas-19.11/src/msym_util/msymc.c:120:45: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 cmsym_find_symmetry(msym_context *pctx, char pgname[6], INT *err){ data/openmolcas-19.11/src/msym_util/msymc.c:124: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[6]; data/openmolcas-19.11/src/msym_util/msymc.c:154: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). FILE *out = fopen(outfile,"w"); data/openmolcas-19.11/src/msym_util/msymc.c:158: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[14]; data/openmolcas-19.11/src/msym_util/msymc.c:185:136: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 cmsym_generate_orbital_subspaces(msym_context *pctx, INT *l, double c[*l][*l], INT irrep_ids[*l], INT irrep_ind[*l], INT* nirreps, char lbl[*l][8], INT *err){ data/openmolcas-19.11/src/msym_util/msymc.c:193: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[18]; data/openmolcas-19.11/src/parnell/main.c:36:41: [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). if ((molcas_nprocs == NULL) || (atoi(molcas_nprocs) != 1)) { data/openmolcas-19.11/src/parnell/parnell.c:32:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 MyWorkDir[FILENAME_MAX]; data/openmolcas-19.11/src/parnell/parnell.c:33:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 WorkDir[FILENAME_MAX]; data/openmolcas-19.11/src/parnell/parnell.h:64:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 char MyWorkDir[FILENAME_MAX]; data/openmolcas-19.11/src/parnell/parnell.h:66:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 char WorkDir[FILENAME_MAX]; data/openmolcas-19.11/src/parnell/parnell_base.c:32: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 tmpWorkDir[FILENAME_MAX+7]; data/openmolcas-19.11/src/parnell/parnell_collect.c:41:33: [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). if ((src_file = fopen (src_name, "r")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_collect.c:116:57: [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). if ((dst_file = fopen (file_name, "w")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_copy.c:40: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 src_name[FILENAME_MAX]; data/openmolcas-19.11/src/parnell/parnell_copy.c:41: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 dst_name[FILENAME_MAX]; data/openmolcas-19.11/src/parnell/parnell_init.c:37: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 tmpWorkDir[FILENAME_MAX+7]; data/openmolcas-19.11/src/parnell/parnell_reduce.c:49:25: [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). if ((src_file = fopen (src_name, "r")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_reduce.c:95:33: [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). if ((dst_file = fopen (dst_name, "w")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_replica.c:60:25: [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). if ((src_file = fopen (src_name, "r")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_replica.c:65:25: [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). if ((dst_file = fopen (dst_name, "w")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_scatter.c:49:41: [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). if ((src_file = fopen (src_name, "r")) == NULL) { data/openmolcas-19.11/src/parnell/parnell_scatter.c:88:33: [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). if ((dst_file = fopen (dst_name, "w")) == NULL) { data/openmolcas-19.11/src/property_util/add_infoc.c:50:3: [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). f=fopen("molcas_info","w"); data/openmolcas-19.11/src/property_util/add_infoc.c:55:3: [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). f=fopen("molcas_info","a"); data/openmolcas-19.11/src/system_util/datimx.c:56:1: [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(TimeStamp,"Once upon a time.."); data/openmolcas-19.11/src/system_util/fndlnk.c:36:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 fntmp[256]; data/openmolcas-19.11/src/system_util/get_genome.c:35: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[LEN_HOST]; data/openmolcas-19.11/src/system_util/get_genome.c:39: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 sTime[LEN_TIME]; data/openmolcas-19.11/src/system_util/getenvc.c:53:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 MOLCAS_ENV[MAXENV]; data/openmolcas-19.11/src/system_util/getenvc.c:85:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[MAXSTR]; data/openmolcas-19.11/src/system_util/getenvc.c:143:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[MAXSTR]; data/openmolcas-19.11/src/system_util/getenvc.c:146: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). MYENV=fopen("molcas.env","r"); data/openmolcas-19.11/src/system_util/putenvc.c:35: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). MYENV=fopen("molcas.env","a+"); data/openmolcas-19.11/src/system_util/set_sighandlers.c:30:35: [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 timeout_sec = atoi(molcas_timelim); data/openmolcas-19.11/src/system_util/write_cc.c:19:24: [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 *stream = fopen("cc", "w"); data/openmolcas-19.11/src/system_util/write_pid.c:19:24: [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 *stream = fopen("pid", "w"); data/openmolcas-19.11/src/system_util/write_rc.c:29: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 stack [5]; data/openmolcas-19.11/src/system_util/write_rc.c:61: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). fd = open("rc.local", O_CREAT|O_WRONLY|O_TRUNC|O_SYNC, S_IRUSR|S_IWUSR); data/openmolcas-19.11/src/xml_util/xml_cdumpa.c:38: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_cdumpa.c:56: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_cdumpb.c:35: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_cdumpb.c:43: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_cdumpc.c:35: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_cdumpc.c:41: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_cdumps.c:35: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_cdumps.c:41: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_closec.c:35: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_closec.c:41: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_ddumpc.c:38: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_ddumpc.c:57: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_idumpc.c:38: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_idumpc.c:39: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 fmt[16]; data/openmolcas-19.11/src/xml_util/xml_idumpc.c:40: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 mfmt[16]; data/openmolcas-19.11/src/xml_util/xml_idumpc.c:58: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_openc.c:38: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 line[256]; data/openmolcas-19.11/src/xml_util/xml_openc.c:52: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). if((f=fopen(XMLDUMP,"a"))==NULL) return; data/openmolcas-19.11/src/xml_util/xml_prspec.c:34: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 line[256]; data/openmolcas-19.11/src/Include/warnings.h:47:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _RC_IO_ERROR_READ_ I/O read error data/openmolcas-19.11/src/io_util/cio.c:44:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read _lread data/openmolcas-19.11/src/io_util/cio.c:151:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = (INT)read(*FileDescriptor,(void *)(Buffer+i),(size_t)(readlength)); data/openmolcas-19.11/src/io_util/cio.c:264:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = (INT)read(*FileDescriptor1,(void *)(Buffer),(size_t)(rce)); data/openmolcas-19.11/src/io_util/filesystem_wrapper.c:28: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). return strlen(*str); data/openmolcas-19.11/src/mma_util/cgetmem.c:347: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(str!=NULL) n=strlen(str); data/openmolcas-19.11/src/mma_util/cgetshmem.c:112:12: [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). wpath=(strlen(path))?path:defpath; data/openmolcas-19.11/src/msym_util/msymc.c:233: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). lbl[sym+l][strlen(lbl[sym+l])] = ' '; data/openmolcas-19.11/src/parnell/parnell_base.c:40:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (WorkDir, *argv, FILENAME_MAX-1); data/openmolcas-19.11/src/parnell/parnell_base.c:68:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(MyWorkDir, WorkDir, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_base.c:71:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(MyWorkDir, tmpWorkDir, FILENAME_MAX-1); data/openmolcas-19.11/src/parnell/parnell_copy.c:52:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (src_name, argv[1], FILENAME_MAX-1); data/openmolcas-19.11/src/parnell/parnell_copy.c:54:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dst_name, argv[2], FILENAME_MAX-1); data/openmolcas-19.11/src/parnell/parnell_init.c:48:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (MyWorkDir, WorkDir, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_init.c:51:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (MyWorkDir, tmpWorkDir, FILENAME_MAX-1); data/openmolcas-19.11/src/parnell/parnell_translate.c:53:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, src_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:60:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, src_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:61:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (src_name, basename (tmp_name), FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:70:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, dst_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:73:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, src_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:75:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dst_name, basename (tmp_name), FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:77:33: [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 (dst_name, "/"); data/openmolcas-19.11/src/parnell/parnell_translate.c:81:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, dst_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:86:49: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, dst_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:87:49: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dst_name, basename (tmp_name), FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:100:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, dst_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:105:41: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (tmp_name, dst_name, FILENAME_MAX); data/openmolcas-19.11/src/parnell/parnell_translate.c:106:41: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dst_name, basename (tmp_name), FILENAME_MAX); data/openmolcas-19.11/src/system_util/datimx.c:72:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(TimeStamp,ptr, CTIME_RES_LENGTH); data/openmolcas-19.11/src/system_util/get_genome.c:47: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). *nDNA=8*((strlen(cDNA)+7)/8); data/openmolcas-19.11/src/system_util/get_genome.c:49: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). cDNA[strlen(cDNA)]=' '; data/openmolcas-19.11/src/system_util/getenvc.c:65:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name0,name,*ilen); data/openmolcas-19.11/src/system_util/getenvc.c:72: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(envvar); data/openmolcas-19.11/src/system_util/getenvc.c:74:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(value,envvar,len); data/openmolcas-19.11/src/system_util/getenvc.c:92:4: [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). i=strlen(name); data/openmolcas-19.11/src/system_util/getenvc.c:99:2: [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(Name,"="); data/openmolcas-19.11/src/system_util/getenvc.c:113: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). value=(char *)malloc((strlen(ptr)+1) *sizeof(char)); data/openmolcas-19.11/src/system_util/getenvc.c:134:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(value,ptr,i); data/openmolcas-19.11/src/system_util/getenvc.c:162: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). i=i+strlen(line); data/openmolcas-19.11/src/system_util/unixinfoc.c:68: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). for(i=0;i<(int)strlen(user->pw_name);i++) username[i]=user->pw_name[i]; data/openmolcas-19.11/src/system_util/unixinfoc.c:69: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). for(i=0;i<(int)strlen(user->pw_gecos);i++) realname[i]=user->pw_gecos[i]; data/openmolcas-19.11/src/system_util/unixinfoc.c:70: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). for(i=0;i<(int)strlen(user->pw_dir);i++) homedir[i]=user->pw_dir[i]; data/openmolcas-19.11/src/system_util/unixinfoc.c:71: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). for(i=0;i<(int)strlen(user->pw_shell);i++) shell[i]=user->pw_shell[i]; data/openmolcas-19.11/src/system_util/unixinfoc.c:83: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). for(i=0;i<(int)strlen(envvar);i++) ANALYSIS SUMMARY: Hits = 247 Lines analyzed = 8466 in approximately 1.65 seconds (5146 lines/second) Physical Source Lines of Code (SLOC) = 5693 Hits@level = [0] 229 [1] 44 [2] 172 [3] 2 [4] 28 [5] 1 Hits@level+ = [0+] 476 [1+] 247 [2+] 203 [3+] 31 [4+] 29 [5+] 1 Hits/KSLOC@level+ = [0+] 83.6115 [1+] 43.3866 [2+] 35.6578 [3+] 5.44528 [4+] 5.09398 [5+] 0.175654 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.