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/plink2-2.00~a3-201028+dfsg/plink2_fasta.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_common.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_import.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc
Examining data/plink2-2.00~a3-201028+dfsg/pvar_ffi_support.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_glm.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_pvar.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_help.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_adjust.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_adjust.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_random.cc
Examining data/plink2-2.00~a3-201028+dfsg/cindex/src/RcppExports.cpp
Examining data/plink2-2.00~a3-201028+dfsg/cindex/src/cindex.cpp
Examining data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc
Examining data/plink2-2.00~a3-201028+dfsg/cuda/plink2_matrix_cuda.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_export.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_decompress.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_data.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_psam.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc
Examining data/plink2-2.00~a3-201028+dfsg/pgenlib_ffi_support.h
Examining data/plink2-2.00~a3-201028+dfsg/pvar_ffi_support.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_import.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_random.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_misc.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_export.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_common.cc
Examining data/plink2-2.00~a3-201028+dfsg/pgenlib_ffi_support.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_filter.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_matrix.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_fasta.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_set.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_matrix.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_cpu.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_set.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_help.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_data.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_ld.h
Examining data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/RcppExports.cpp
Examining data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp
Examining data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.h
Examining data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp
Examining data/plink2-2.00~a3-201028+dfsg/plink2_decompress.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_zstfile.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_thread.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_stats.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_thread.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_bits.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_text.h
Examining data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.h
Examining data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_bits.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_stats.h
Examining data/plink2-2.00~a3-201028+dfsg/include/SFMT.c
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_base.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_zstfile.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/SFMT.h
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc
Examining data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.h
Examining data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h
Examining data/plink2-2.00~a3-201028+dfsg/pgen_compress.cc
Examining data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.h

FINAL RESULTS:

data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:596: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(&(R_CAST(char*, wkspace_alias)[new_idx * max_str_blen]), strptr);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:605: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(&(R_CAST(char*, wkspace_alias)[new_idx * max_str_blen]), strptr);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:663: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(&(sorted_strbox[str_idx * max_str_blen]), filled_wkspace[str_idx].strbuf);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:676: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(&(sorted_strbox[str_idx * max_str_blen]), filled_wkspace[str_idx].strbuf);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:688: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(wkspace_alias[str_idx].strbuf, cur_str);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:698: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(wkspace_alias[str_idx].strbuf, cur_str);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:3027: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(&(sorted_ids[write_idx * max_id_blen]), &(sorted_ids[read_idx * max_id_blen]));
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:3040: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(&(sorted_ids[write_idx * max_id_blen]), &(sorted_ids[read_idx * max_id_blen]));
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:381:3:  [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(dst, S_CAST(const char*, src));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2700: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(stderr, kErrprintfFopen, in_fname, strerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2708: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(stderr, kErrprintfFopen, out_fname, strerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2749:7:  [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(stderr, kErrprintfFread, in_fname, zsterror(&zrf));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2751:7:  [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(stderr, kErrprintfDecompress, in_fname, zsterror(&zrf));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2755:5:  [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(stderr, kErrstrWrite, strerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2763:5:  [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(stderr, kErrprintfFread, in_fname, rstrerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:10188:13:  [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(pvarname, pgenname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:10237:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(memcpya(pvarname, outname, convname_slen), kMaxOutfnameExtBlen - 10, pvar_is_compressed? ".pvar.zst" : ".pvar");
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1576: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(sort_wkspace_iter, &(orig_strbox[str_uidx * max_str_blen]));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1618: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(&(sorted_strbox[str_idx * max_str_blen]), sort_wkspace[str_idx].strptr);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3521:5:  [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(stderr, kErrprintfFopen, rerun_fname, strerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3572:11:  [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(stderr, kErrprintfFopen, argvk[arg_idx + 1], strerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3578:11:  [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(stderr, kErrprintfFread, argvk[arg_idx + 1], rstrerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3585:11:  [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(stderr, kErrprintfFread, argvk[arg_idx + 1], rstrerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3611:11:  [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(stderr, kErrprintfFread, argvk[arg_idx + 1], rstrerror(errno));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:171:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:178:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:191:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:198:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:206:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:215:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:224:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.h:233:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(g_logbuf, kLogbufSize, fmt, args);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:740: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(write_iter, &(sids[sample_uidx * max_sid_blen]));
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:840: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(write_iter, &(sids[sample_uidx * max_sid_blen]));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11348:13:  [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_covar_names[(local_covar_ct + condition_idx) * new_max_covar_name_blen]), variant_ids[cur_variant_uidx]);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11373: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(covar_names_write_iter, covar_names_read_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1168: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(&(pheno_names[pheno_idx * new_max_pheno_name_blen]), &(old_pheno_names[pheno_idx * old_max_pheno_name_blen]));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2641: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_pheno_names[pheno_write_idx * new_max_pheno_name_blen]), &(old_pheno_names[pheno_read_idx * old_max_pheno_name_blen]));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2673:11:  [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_phenoname_write_iter, old_cat_names[orig_cat_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:298: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(&(pheno_names[pheno_idx * max_pheno_name_blen]), pheno_names_reverse_ll->str);
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:1091: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(&(pheno_names[old_pheno_idx * max_pheno_name_blen]), &((*pheno_names_ptr)[old_pheno_idx * old_max_pheno_name_blen]));
data/plink2-2.00~a3-201028+dfsg/pvar_ffi_support.cc:365: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(&(errstr_buf[7]), errmsg);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:824:11:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
          EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:876:11:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
          EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1014:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1109:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1127:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1382:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&syncp->critical_section);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1476:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1698:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1770:7:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
      EnterCriticalSection(critical_sectionp);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:730:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
      if (unlikely(!realpath(pgenname, g_textbuf)))
data/plink2-2.00~a3-201028+dfsg/plink2.cc:910:23:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        if (unlikely(!realpath(pvarname, g_textbuf)))
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:3066:11:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  return (realpath(outname, write_realpath_buf) && strequal_overread(read_realpath, write_realpath_buf));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2706:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
      if (unlikely(!realpath(subset_fname, g_textbuf)))
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:27: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(output_nyparr, raw_nyparr, DivUp(subset_entry_ct, kBitsPerWordD2) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:183: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(output_nyparr, raw_nyparr, DivUp(subset_entry_ct, kBitsPerWordD2) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1455: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.
          memcpy(result_iter, &(table_alias[geno_word & 3]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1523: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.
          memcpy(result_iter, &(table_alias[geno_word & 3]), 8);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1552: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(&(result_last[uii]), &(table_alias[geno_byte & 3]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1573: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(result_iter, &(table_alias[(geno_word & 3) * 2]), 16);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1590: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.
          memcpy(result_iter, &(table_alias[(geno_word & 3) * 2]), 8);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1599: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(result_iter, &(table_alias[cur_2geno * 2]), 16);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1612: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(&(result_alias[byte_idx * 4]), &(table_alias[genoarr_alias[byte_idx] * 4]), 16);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1619: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(&(result_last[uii]), &(table_alias[(geno_byte & 3) * 4]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1671:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char vals[4];
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1763: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1868: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 8);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1916: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.
          memcpy(result_iter, &(table_alias[cur_idx * 2]), 8);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1926: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(result_iter, &(table_alias[(geno_word & 15) * 2]), 16);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:1936: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(result_iter, &(table_alias[cur_idx * 2]), 16);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2019: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2111: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2192: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 8);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2223: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.
          memcpy(result_iter, &(table_alias[cur_idx * 2]), 8);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2233: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(result_iter, &(table_alias[((geno_word & 15) | (male_hw_shifted & 48)) * 2]), 16);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2257: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.cc:2393: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.
          memcpy(result_iter, &(table_alias[cur_idx]), 2);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_misc.h:205:3:  [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(target_nyparr, source_nyparr, NypCtToWordCt(nyparr_entry_ct) * kBytesPerWord);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:481:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char small_readbuf[3];
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:491:27:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int32_t file_handle = open(fname, O_RDONLY);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:525: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).
    shared_ff = fopen(fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:613: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(&(pgfip->raw_variant_ct), &(fread_ptr[3]), sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:614: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(&(pgfip->raw_sample_ct), &(fread_ptr[7]), sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:615: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(header_ctrl_ptr, &(fread_ptr[11]), 1);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:786:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char loadbuf[kPglVblockSize * 4];
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:825: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.
          memcpy(nonref_flags_iter, fread_ptr, nonref_flags_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:921: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(&cur_fpos, fread_ptr, sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1134: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 vrtype_table[16];
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1294: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.
          memcpy(vrtypes_iter, fread_ptr, cur_vblock_variant_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1348: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.
          memcpy(&cur_vrec_len, &(fread_ptr[cur_vblock_vidx * 3]), sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1359: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.
          memcpy(&cur_vrec_len, &(fread_ptr[cur_vblock_vidx * 4]), 4);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1443: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.
          memcpy(nonref_flags_iter, fread_ptr, cur_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1679:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      pgrp->ff = fopen(fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1842:3:  [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(raregeno_buf, raregeno_start, raregeno_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:1993: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(merged_difflist_sample_ids, ldbase_difflist_sample_ids, ldbase_difflist_len * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:2335:3:  [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(genoarr, src_genodata, genoarr_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:2577: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(dest, raw_genovec, genovec_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:2581: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(dest, pgrp->ldbase_raw_genovec, genovec_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:2586: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(dest, pgrp->ldbase_genovec, genovec_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:2894: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(pgrp->ldbase_difflist_sample_ids, difflist_sample_ids, difflist_len * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:6650: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(phasepresent, all_hets, raw_sample_ctl * kBytesPerWord);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:6674: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(aux2_first_part_copy, aux2_first_part, 1 + (het_ct / CHAR_BIT));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7091: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(raw_dosage_present, fread_ptr, raw_sample_ctb);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7143: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.
          memcpy(dosage_main_write_iter, dosage_main_read_iter, dosage_ct * sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7218: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.
          memcpy(dosage_main_write_iter, dosage_main_read_iter, dosage_ct * sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7219: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.
          memcpy(dphase_delta, fread_ptr, dphase_ct * sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7522: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(phasepresent, all_hets, raw_sample_ctl * kBytesPerWord);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7709: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(raw_phasepresent, all_hets, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7787: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(raw_dosage_present, fread_ptr, raw_sample_ctb);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:7893: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(raw_dosage_present, fread_ptr, raw_sample_ctb);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9097: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(loadbuf_iter, fread_ptr, first_half_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9127: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(loadbuf_iter, fread_ptr, second_half_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9214: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(missingness_dosage, missingness_hc, BitCtToWordCt(sample_ct) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9229: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(missingness_dosage, missingness_hc, BitCtToWordCt(sample_ct) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9326: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(dosage_present, fread_ptr, raw_sample_ctb);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9399:3:  [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(raregeno_buf, raregeno_start, raregeno_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:9585: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(genovec, src_genodata, genovec_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:10234: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(&header_ctrl, &(pgrp->fi.block_base[11]), 1);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_read.cc:10308: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(&last_vrtype_byte, &(pgrp->fi.block_base[last_vrtype_byte_offset]), 1);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:77: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* pgen_outfile = fopen(fname, FOPEN_WB);
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:110:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char zerobuf[kPglFwriteBlockSize];
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:900: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(ldbase_genovec, genovec, genovec_word_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:903:3:  [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(ldbase_genovec, genovec, genovec_word_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:1172: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(pwcp->ldbase_raregeno, raregeno, NypCtToByteCt(difflist_len));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:1173: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(pwcp->ldbase_difflist_sample_ids, difflist_sample_ids, difflist_len * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:1193: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(pwcp->ldbase_genovec, genobuf, NypCtToWordCt(sample_ct) * sizeof(uintptr_t));
data/plink2-2.00~a3-201028+dfsg/include/pgenlib_write.cc:1667:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(genovec_hets, genovec, sample_ctl2 * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:1672:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define STD_ARRAY_COPY(src, nn, dst) memcpy(dst, src, nn * sizeof(dst[0]));
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2285:3:  [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(pp, &addr, sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2516:3:  [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(target, source, ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2521:3:  [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(target, source, ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2526:3:  [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(*targetp, &usii, sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2531:3:  [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(*targetp, &uii, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2648: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(dst, src, N);
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2847:3:  [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(dst, src, ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:2859:3:  [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(dst, src, ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:218: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(overflow_dst_start, cwd->overflow, overflow_copy_ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:290: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(in, &(in[locked_end]), remaining_read_start);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:344: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.
          memcpy(&(target[out_offset]), dst, out_capacity - out_offset);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:385: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(bodyp->in, header, 16);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:467: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(*dst_iterp, overflow_src_start, dst_capacity);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:521: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(bodyp->in, header, 16);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:600: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(&(dst[16]), &bsize, 2);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:601: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(&(dst[bsize - 7]), &crc, 4);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:602: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(&(dst[bsize - 3]), &src_byte_ct, 4);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:689: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).
  bgzfp->ff = fopen(out_fname, do_append? FOPEN_AB : FOPEN_WB);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:786: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(cww->cbuf, kBgzfEofBlock, 16);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:887: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(&(cwp->ucbuf[dst_offset]), buf, ncopy);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.cc:920:3:  [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(&(cwp->ucbuf[dst_offset]), buf, len);
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.h:204:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char cbuf[kMaxBgzfCompressedBlockSize];
data/plink2-2.00~a3-201028+dfsg/include/plink2_bgzf.h:218:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ucbuf[kBgzfInputBlockSize];
data/plink2-2.00~a3-201028+dfsg/include/plink2_bits.cc:2214: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.
const unsigned char kLeadMask[2 * kBytesPerVec] __attribute__ ((aligned (64))) =
data/plink2-2.00~a3-201028+dfsg/include/plink2_bits.cc:2220: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.
const unsigned char kLeadMask[2 * kBytesPerVec] __attribute__ ((aligned (32))) =
data/plink2-2.00~a3-201028+dfsg/include/plink2_bits.h:495:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 const unsigned char kLeadMask[2 * kBytesPerVec] __attribute__ ((aligned (64)));
data/plink2-2.00~a3-201028+dfsg/include/plink2_bits.h:497:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 const unsigned char kLeadMask[2 * kBytesPerVec] __attribute__ ((aligned (32)));
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:610:3:  [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(strbox, wkspace_alias, str_ct * max_str_blen);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:736: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(&(strbox[write_idx * max_str_blen]), cur_str, cur_slen + 1);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:815:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char kToUpper[256] = {
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:2686:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char wbuf[16];
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:3178: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(&four_chars, ss, 4);  // OVERREAD
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:3186:3:  [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(&eight_chars, ss, 8);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:300:3:  [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(dst, src, ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:306:3:  [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(dst, src, ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:317:3:  [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(dst, src, slen);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:331:3:  [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(dst, src, slen + 1);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:510:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char strbuf[28];
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:518:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char strbuf[60];
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:37:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* infile = fopen(fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:43:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[16];
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:53:3:  [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(&magic4, buf, 4);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:91:3:  [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(gzp->in, buf, nbytes);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:114:3:  [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(K_CAST(void*, zstp->ib.src), buf, nbytes);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:161:16:  [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).
    trbp->ff = fopen(fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:213:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(bgzfp->in, dst, nbytes);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:459: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.
          memcpy(dst_next, line_start, dst_rem);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1056: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.
          memcpy(buf, next_available_end, trailing_byte_ct);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1190:23:  [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* next_ff = fopen(new_fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1267:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(gzp->in, buf, nbytes);
data/plink2-2.00~a3-201028+dfsg/include/plink2_text.cc:1285:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(K_CAST(void*, zstp->ib.src), buf, nbytes);
data/plink2-2.00~a3-201028+dfsg/include/plink2_zstfile.cc:52:16:  [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).
    zrfp->ff = fopen(fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/pgen_compress.cc:46:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[kPglErrstrBufBlen];
data/plink2-2.00~a3-201028+dfsg/pgen_compress.cc:93: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).
      outfile = fopen(argv[3], FOPEN_WB);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errstr_buf[plink2::kPglErrstrBufBlen];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:187:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "PgrInit() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:273:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:274:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, _info_ptr->raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:305:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:306:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, _info_ptr->raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:310:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:311:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "buf has wrong length (%" PRIdPTR "; %u expected)", buf.size(), _subset_size);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:316:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:317:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "PgrGet1() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:330:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:331:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, _info_ptr->raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:335:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:336:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "buf has wrong length (%" PRIdPTR "; %u expected)", buf.size(), _subset_size);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:341:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:342:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "PgrGet1() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:353:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:354:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, _info_ptr->raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:358:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:359:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "buf has wrong length (%" PRIdPTR "; %u expected)", buf.size(), _subset_size);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:365:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:366:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "PgrGet1D() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:380:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:381:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "acbuf has wrong size (%dx%d; 2x%u expected)", acbuf.nrow(), acbuf.ncol(), _subset_size);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:462:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:463:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "acbuf has wrong size (%dx%d; 2x%u expected)", acbuf.nrow(), acbuf.ncol(), _subset_size);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:539:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:540:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errstr_buf, "variant_subset element out of range (%d; must be 1..%u)", variant_idx + 1, raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:545:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:546:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errstr_buf, "PgrGet() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:565:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:566:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errstr_buf, "variant_subset element out of range (%d; must be 1..%u)", variant_idx + 1, raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:572:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:573:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errstr_buf, "PgrGetD() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:581: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 errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:582:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(errstr_buf, "variant %d has only missing dosages", variant_idx + 1);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:595:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:596:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "weights.size()=%td doesn't match pgen sample-subset size=%d", weights.size(), _subset_size);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:612: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 errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:613:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:620:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:621:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errstr_buf, "PgrGetD() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:670:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:671:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errstr_buf, "sample number out of range (%d; must be 1..%u)", static_cast<int>(sample_uidx + 1), raw_sample_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:696:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:697:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, _info_ptr->raw_variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:702:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pgenlibr.cpp:703:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "PgrGetMP() error %d", static_cast<int>(reterr));
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:8:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errbuf[plink2::kPglErrstrBufBlen];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:27: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 errbuf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:29:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errbuf, "variant_num out of range (%d; must be 1..%d)", variant_idx + 1, _mp.variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:31: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(errbuf, "pvar closed");
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp: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 errstr_buf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:41:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errstr_buf, "variant_num out of range (%d; must be 1..%u)", variant_idx + 1, _mp.variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:53: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 errbuf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:55:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(errbuf, "variant_num out of range (%d; must be 1..%d)", variant_idx + 1, _mp.variant_ct);
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:57: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(errbuf, "pvar closed");
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:69: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 errbuf[256];
data/plink2-2.00~a3-201028+dfsg/pgenlibr/src/pvar.cpp:70:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(errbuf, "allele_num out of range (%d; must be 1..%d)", allele_idx + 1, allele_ct);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:748: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(g_textbuf, pgenname, fname_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:755: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(g_textbuf, pvarname, fname_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:763: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(g_textbuf, psamname, fname_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:922:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(g_textbuf, pvarname, fname_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:936:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(g_textbuf, pvarname, fname_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1658:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(pheno_names[pheno_idx2 * max_pheno_name_blen]), &(pheno_names[(pheno_idx2 + 1) * max_pheno_name_blen]), max_pheno_name_blen);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1680:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(covar_names[covar_idx2 * max_covar_name_blen]), &(covar_names[(covar_idx2 + 1) * max_covar_name_blen]), max_covar_name_blen);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1704: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(loop_cats_variant_include_backup, variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1737: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(founder_info, loop_cats_founder_info_backup, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1738: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(sex_nm, loop_cats_sex_nm_backup, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1739: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(sex_male, loop_cats_sex_male_backup, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1743: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.
          memcpy(variant_include, loop_cats_variant_include_backup, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2202: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.
          memcpy(prev_sample_include, sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2376:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(variant_bps_backup, variant_bps, raw_variant_ct * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2381: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.
              memcpy(allele_storage_backup, allele_storage, raw_allele_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2388: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.
              memcpy(nonref_flags_backup, nonref_flags, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2577: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.
          memcpy(variant_bps, variant_bps_backup, raw_variant_ct * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2581: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.
          memcpy(allele_storage, allele_storage_backup, raw_allele_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2584: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.
          memcpy(nonref_flags, nonref_flags_backup, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2706: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).
      outfile = fopen(out_fname, FOPEN_WB);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2777:3:  [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((*tcbuf)->fname, sources[0], fname_blen);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3498: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.
          memcpy(flagname_write_iter, flagname_p, flag_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3504: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 outname[kPglFnamesize];
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3514: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 pgenname[kPglFnamesize];
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3515: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 psamname[kPglFnamesize];
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3516: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 pvarname[kPglFnamesize];
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4050: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.
          memcpy(pgenname, cur_modif, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4091: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.
          memcpy(pgenname, cur_fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5651: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.
          memcpy(pgenname, cur_fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5829: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.
          memcpy(pgenname, cur_fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6181: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.
          memcpy(pgenname, cur_modif, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6412: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.
          memcpy(pvarname, cur_fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7488: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.
          memcpy(g_missing_catname, cur_modif, cur_modif_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7678: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.
          memcpy(pvarname, cur_modif, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7966: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.
          memcpy(g_output_missing_pheno, cur_modif, cur_modif_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8016: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.
          memcpy(pgenname, fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8031: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.
          memcpy(psamname, fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8046: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.
          memcpy(pvarname, fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8765: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.
          memcpy(psamname, cur_fname, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9544: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.
          memcpy(pgenname, cur_modif, slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2_adjust.cc:379: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 output_min_p_buf[24];
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:39: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 g_textbuf[kTextbufSize];
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:55: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 g_logbuf[kLogbufSize];
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:114:25:  [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).
  int32_t file_handle = open(fname, O_RDONLY);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:150: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).
  *target_ptr = fopen(fname, mode);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:508: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).
  g_logfile = fopen(outname, "w");
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:802:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_llstr->str, str, blen);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1579: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.
          memcpy(sort_wkspace_iter, &str_idx, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1581: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.
          memcpy(sort_wkspace_iter, &str_uidx, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1983: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(target_bitarr_iter, src_bitarr_iter, fullword_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3305:3:  [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(*sbuf_ptr, source, blen);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3318:3:  [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(*fnbuf_ptr, source, blen);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3359: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).
    rerunfile = fopen(rerun_fname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3437: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(rerun_buf, textbuf, line_byte_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3490: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(subst_argv2, &(argv[first_arg_idx]), new_arg_idx * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3502: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(&(subst_argv2[new_arg_idx]), &(argv[final_copy_start_idx]), (argc - final_copy_start_idx) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3568:22:  [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).
        scriptfile = fopen(argvk[arg_idx + 1], FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3644: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(subst_argv, &(argvk[1]), arg_idx * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3654: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(&(subst_argv[load_param_idx_end]), &(argvk[arg_idx + 2]), (argc - arg_idx - 2) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3867: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(outname, argvk[arg_idx + 1], slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4206: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(&(new_pheno_name_buf[pheno_name_slen + 1]), pheno_val_start, pheno_val_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4252: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(&(merged_strbox[search_term_idx * max_blen]), multistr_iter, cur_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4362: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(&(sorted_ids[id_idx * max_id_blen]), supported_ids_iter, blen);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4397:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(maybebuf[5]), id_start, slen);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1003: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(idbuf_iter, sid_ptr, blen_sid - 1);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1181:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char g_xymt_log_names[kChrOffsetCt][5] = {"chrX", "chrY", "XY", "chrM", "PAR1", "PAR2"};
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1365:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_alloc_iter, cip->chr_mask, chr_code_bitvec_ct * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1369:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_alloc_iter, cip->haploid_mask, chr_code_bitvec_ct * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1373:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_alloc_iter, cip->chr_file_order, chr_ct_int32vec_ct * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1377:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_alloc_iter, cip->chr_fo_vidx_start, chr_ct_p1_int32vec_ct * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1381:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_alloc_iter, cip->chr_idx_to_foidx, chr_code_end_int32vec_ct * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1390: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(new_alloc_iter, cip->nonstd_names, chr_code_end_wordvec_ct * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1394: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(new_alloc_iter, cip->nonstd_id_htable, kChrHtableSize * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1749:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_nonstd_name, chr_name, name_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:2302:3:  [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(working_variant_include, *variant_include_ptr, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:2388: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 g_missing_catname[kMaxMissingPhenostrBlen];
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:2389: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 g_output_missing_pheno[kMaxMissingPhenostrBlen];
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:2390: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 g_legacy_output_missing_pheno[kMaxMissingPhenostrBlen];
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:3166:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char g_vft_names[3][18] = {"extract", "extract-intersect", "exclude"};
data/plink2-2.00~a3-201028+dfsg/plink2_common.h:686: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.
extern const char g_xymt_log_names[kChrOffsetCt][5];
data/plink2-2.00~a3-201028+dfsg/plink2_common.h:1125:3:  [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(outname_end, ext, ext_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2_common.h:1137: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.
extern const char g_vft_names[3][18];
data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.cc:30:22:  [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).
  css_ptr->outfile = fopen(out_fname, do_append? FOPEN_AB : FOPEN_WB);
data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.cc:53:22:  [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).
  css_ptr->outfile = fopen(out_fname, do_append? FOPEN_AB : FOPEN_WB);
data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.cc:135: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(writep, readp, cur_write_space);
data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.cc:146: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(writep, readp, cur_write_space);
data/plink2-2.00~a3-201028+dfsg/plink2_compress_stream.cc:170:3:  [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(writep, readp, byte_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:1496:3:  [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(write_dosagepresent, read_dosagepresent, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:1497:3:  [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(write_dosagevals, read_dosagevals, dosage_ct * sizeof(Dosage));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:2126:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(allele_ddosages[cur_allele_idx_offset]), all_dosages, allele_ct * sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:2147:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&(allele_ddosages[cur_allele_idx_offset]), all_dosages, allele_ct * sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:2762:3:  [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(dphase_delta, tmp_dphase_delta, dphase_ct * sizeof(Dosage));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:4994: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(new_collapsed_sort_map, new_sample_idx_to_old, sample_ct * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:6512:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(new_genovec, pgv.genovec, raw_sample_ctl2 * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:7980: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(write_chr_info.chr_exclude, cip->chr_exclude, kChrExcludeWords * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:696: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(sample_include, orig_sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1086:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_iter, &(hardcall_strs[geno_word & 3]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1105: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.
              memcpy(write_iter, &(hardcall_strs[geno_word & 3]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1127:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(write_iter, &(hardcall_strs[geno_word & 3]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1809: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(writebuf, "\24\0\0\0\24\0\0", 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1810: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(&(writebuf[8]), &variant_ct, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1811: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(&(writebuf[12]), &sample_ct, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1812: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(&(writebuf[16]), "bgen\5\0\0", 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1837: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(writebuf, &sample_ct, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1838: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(&(writebuf[4]), "\0", 2);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2186:3:  [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(&(tablesp->diploid_phased_hardcall_table[4]), tablesp->diploid_phased_hardcall_table, 4 * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2187:3:  [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(&(tablesp->diploid_phased_hardcall_table[8]), tablesp->diploid_phased_hardcall_table, 8 * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2525: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.
              memcpy(probs_write_citer, &(bgen_diploid_hardcall_table8[cur_geno4]), sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2532: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.
              memcpy(probs_write_citer, &(bgen_diploid_hardcall_table16[2 * cur_geno4]), 2 * sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2653:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(probs_write_citer, &new_bytes, sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2667:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(probs_write_citer, &low_bits, sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:2668:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(probs_write_citer[8]), &high_bits, sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3353: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(writebuf, "\24\0\0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3357: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(writebuf, &initial_bgen_offset, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3971: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.
const unsigned char kValidVcf43ContigChars[256] = {
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:4937: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.
                  memcpy(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:4985:23:  [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(write_iter, &(hds_inttext[cur_geno]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5014: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.
                  memcpy(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5053:23:  [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(write_iter, &(hds_inttext[cur_geno]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5121: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.
                  memcpy(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5132:27:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5192:25:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5239:23:  [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(write_iter, &(hds_inttext[hds_inttext_index]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5277: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.
                  memcpy(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5286:27:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5340:25:  [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(write_iter, &(hds_inttext[hds_inttext_index]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5370:25:  [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(write_iter, &(hds_inttext[cur_geno]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5495:21:  [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(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5605:21:  [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(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5755:29:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5827:21:  [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(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5834:29:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:5914:27:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:6009:21:  [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(write_iter, &(basic_genotext[cur_geno]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:6018:29:  [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(&(write_iter[-4]), "\t1|0", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:6225: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(write_iter, &sii, sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:6229:3:  [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(write_iter, &ii, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:6672: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(&(cur_gp[2]), &eov_bits, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7973: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(&(writebuf[5]), &l_header, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8380: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(&(rec_start[8]), &chr_bcf_idx, sizeof(int32_t));  // CHROM
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8382: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(&(rec_start[12]), &bp0, sizeof(int32_t));  // POS
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8387: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(&(rec_start[20]), &missing_val, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8389: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(&(rec_start[20]), &(pvar_quals[variant_uidx]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8394: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(&(rec_start[28]), &sample_ct, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8497:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_iter, &fif_idx, sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8504:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_iter, &fif_idx, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8662:21:  [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(&(write_alias[value_idx]), &missing_bits, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8678:25:  [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(&(write_alias[value_idx]), &nan_bits, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8685:25:  [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(&(write_alias[value_idx]), &(inf_bits[is_neg]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8733: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(rec_start, &l_shared, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8734: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(&(rec_start[16]), &rlen, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8735: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(&(rec_start[24]), &n_info, sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8736: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(&(rec_start[26]), &n_allele, sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:9062:27:  [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(&(cur_hds[2 * sample_idx_lowbits + 1]), &eov_bits, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:9289: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(&(rec_start[4]), &l_indiv, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:9768: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(sample_include, orig_sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:10016: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(new_export_allele, refalt1_select, raw_variant_ct * 2 * sizeof(AlleleCode));
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1179: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(item_include, new_item_include, raw_item_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1193:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char kKeepRemoveFlagStrs[4][11] = {"keep", "remove", "keep-fam", "remove-fam"};
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1350: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(sample_include, seen_uidxs, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1520: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(sample_include, keep_uidxs, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1664: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(sample_include_intersect, sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1825:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char file_descrip[32];
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:4274: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.
          memcpy(bigstack_end, allele_start, allele_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:4357: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(previously_seen, already_seen, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:4368:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char file_descrip_buf[32];
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:265: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(sample_include_copy, new_sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:509: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(variant_include_copy, new_variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:854: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(sample_include_backup, cur_sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:855: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(covar_include, initial_covar_include, raw_covar_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:893: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(cur_sample_include, sample_include_backup, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1311: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(corr_buf, inverse_corr_buf, relevant_predictor_ct * relevant_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1312: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(&(corr_buf[relevant_predictor_ct * relevant_predictor_ct]), dbl_2d_buf, relevant_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1615: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(new_covar_name_write, catname, catname_slen + 1);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1680: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(&(xtx_image_row[1 + xtx_state]), &(covar_dotprod[covar_idx * new_covar_ct]), (covar_idx + 1) * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1690: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(&(covarx_dotprod_inv[row_idx * new_covar_ct_p1 + 1]), &(covar_dotprod[(row_idx - 1) * new_covar_ct]), row_idx * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1701:3:  [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(nm_precomp->corr_inv, corr_inv_tri, new_covar_ct * new_covar_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1708: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(&(corr_image[(orig_row_idx + xtx_state) * stride + xtx_state]), &(corr_buf[orig_row_idx * new_covar_ct]), (orig_row_idx + 1) * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1711:3:  [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(nm_precomp->corr_inv_sqrts, &(corr_buf[new_covar_ct * new_covar_ct]), new_covar_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:2847: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(&(hh[write_row_idx * regressed_predictor_ctav + 1]), &(hh[(write_row_idx - 1) * regressed_predictor_ctav]), write_row_idx * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:2850: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(&(ll[write_row_idx * regressed_predictor_ctav + 1]), &(ll[(write_row_idx - 1) * regressed_predictor_ctav]), write_row_idx * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:3128: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(&(hh[write_row_idx * regressed_predictor_ctav + 1]), &(hh[(write_row_idx - 1) * regressed_predictor_ctav]), write_row_idx * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:3263: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(&(xx[sample_ctav]), *covars_cmaj_f_ptr, sample_ctav * (pred_ct - 1) * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:3796: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(semicomputed_biallelic_xtx, nm_precomp->xtx_image, cur_biallelic_predictor_ct * cur_biallelic_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:3800: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(semicomputed_biallelic_corr_matrix, nm_precomp->corr_image, nonintercept_biallelic_pred_ct * nonintercept_biallelic_pred_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:3801: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(&(semicomputed_biallelic_inv_corr_sqrts[domdev_present_p1]), nm_precomp->corr_inv_sqrts, nongeno_pred_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4340: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.
              memcpy(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4418: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.
                  memcpy(write_iter, read_iter, nm_sample_ctav * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4723: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.
                  memcpy(&(beta_se_iter2[-1]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4751:23:  [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(beta_se_iter2, &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4768: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.
                  memcpy(&(beta_se_iter[2 * include_intercept]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4776:21:  [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(beta_se_iter2, &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4794:21:  [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(beta_se_iter2, &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4809: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.
                  memcpy(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4862:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char main_effect[4];
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4864: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(main_effect, "DOMx", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4866: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(main_effect, "RECx", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4868: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(main_effect, "HOMx", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4870: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(main_effect, "ADDx", 4);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4874:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char domdev_str[8];
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:5309: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(&(local_covars_vcmaj_f_iter[row_idx * row_width]), local_covars_vcmaj_f_iter, row_copy_ct * row_width * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:5319: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(&(local_covars_vcmaj_d_iter[row_idx * row_width]), local_covars_vcmaj_d_iter, row_copy_ct * row_width * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:5421: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(local_covars_vcmaj_f_iter, prev_local_covar_row_f, row_width * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:5423: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(local_covars_vcmaj_d_iter, prev_local_covar_row_d, row_width * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:6504:21:  [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(&glm_errcode, &(beta_se_iter[2 * test_idx]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:6947: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(semicomputed_biallelic_corr_matrix, nm_precomp->corr_image, nonintercept_biallelic_pred_ct * nonintercept_biallelic_pred_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:6948: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(&(semicomputed_biallelic_inv_corr_sqrts[domdev_present_p1]), nm_precomp->corr_inv_sqrts, nongeno_pred_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7410: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.
              memcpy(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7472: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.
                  memcpy(write_iter, read_iter, nm_sample_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7583: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.
              memcpy(xtx_inv, xtx_image, cur_predictor_ct * cur_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7584: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.
              memcpy(xt_y, xt_y_image, cur_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7676: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.
              memcpy(xtx_inv, dbl_2d_buf, cur_predictor_ct * cur_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7749:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(beta_se_iter2, &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7772:23:  [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(&(beta_se_iter2[2 * extra_write_allele_idx]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7790: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.
                  memcpy(&(beta_se_iter[2 * include_intercept]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7798:21:  [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(&(beta_se_iter2[2 * uii]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7816:21:  [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(&(beta_se_iter2[2 * extra_write_allele_idx]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:7852: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.
                  memcpy(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:8613:21:  [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(&glm_errcode, &(beta_se_iter[2 * test_idx]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9017: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(semicomputed_biallelic_corr_matrix, nm_precomp->corr_image, nonintercept_biallelic_pred_ct * nonintercept_biallelic_pred_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9018: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(&(semicomputed_biallelic_inv_corr_sqrts[domdev_present_p1]), nm_precomp->corr_inv_sqrts, nongeno_pred_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9474: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.
              memcpy(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9540: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.
                  memcpy(write_iter, read_iter, nm_sample_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9651: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.
              memcpy(xtx_inv, xtx_image, cur_predictor_ct * cur_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9652: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.
              memcpy(xt_y, xt_y_image, cur_predictor_ct * subbatch_size * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9757: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.
              memcpy(xtx_inv, dbl_2d_buf, cur_predictor_ct * cur_predictor_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9844: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.
                  memcpy(beta_se_iter2, &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9867:25:  [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(&(beta_se_iter2[2 * extra_write_allele_idx]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9885:21:  [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(&(beta_se_iter[2 * include_intercept]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9893:23:  [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(&(beta_se_iter2[2 * uii]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9911:23:  [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(&(beta_se_iter2[2 * extra_write_allele_idx]), &glm_err2, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9949:21:  [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(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:9965:21:  [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(&(beta_se_iter[uii * 2]), &glm_err, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:10826:25:  [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(&glm_errcode, &(beta_se_iter2[2 * test_idx]), 8);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:10935:3:  [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(parameters_or_tests, parameter_subset_reshuffle_buf, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11052: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.
              memcpy(variant_include_nohap, early_variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11358: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(&(new_covar_cols[condition_ct + local_covar_ct]), covar_cols, orig_covar_ct * sizeof(PhenoCol));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11540: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.
          memcpy(raw_joint_test_params, tests_buf, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11759:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(joint_test_params_buf, common.joint_test_params, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11845: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.
                  memcpy(joint_test_params_buf, common.joint_test_params_x, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11935: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.
                  memcpy(joint_test_params_buf, common.joint_test_params_y, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12069: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.
          memcpy(tmp_variant_include, early_variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12075:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tmp_local_variant_include, local_variant_include, local_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12254: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.
          memcpy(joint_test_params_buf, common.joint_test_params, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12378:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(joint_test_params_buf, common.joint_test_params_x, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12485:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(joint_test_params_buf, common.joint_test_params_y, biallelic_raw_predictor_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12671: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(tmp_variant_include, early_variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12677: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.
          memcpy(tmp_local_variant_include, local_variant_include, local_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:12754: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(valid_variants, cur_variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2602:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_dosage_present, dosage_present, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2603:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_dosage_main, dosage_main, dosage_ct * sizeof(Dosage));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2605: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.
              memcpy(write_dphase_present, dphase_present, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2606: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.
              memcpy(write_dphase_delta, dphase_delta, dphase_ct * sizeof(SDosage));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2611: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(write_genovec, genovec, sample_ctl2 * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2613: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.
          memcpy(write_patch_01_set, patch_01_set, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2614: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.
          memcpy(write_patch_01_vals, patch_01_vals, patch_01_ct * sizeof(AlleleCode));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2617: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.
          memcpy(write_patch_10_set, patch_10_set, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2618: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.
          memcpy(write_patch_10_vals, patch_10_vals, patch_10_ct * sizeof(AlleleCode) * 2);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2621: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.
          memcpy(write_phasepresent, phasepresent, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2622: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.
          memcpy(write_phaseinfo, phaseinfo, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:3560:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(geno_buf_iter, linebuf_iter, genotext_byte_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4016:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char biallelic_gt_lookup[32];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4018:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char biallelic_gt_lookup[16];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4403: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(&qual_min, &fxx, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4601: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.
          memcpy(&second_and_third_bytes, second_byte_iter, 2);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4656: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.
          memcpy(&second_and_third_u16s, second_u16_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4714: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(&second_and_third_bytes, second_byte_iter, 2);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4763: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(&second_and_third_u16s, second_u16_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4858:3:  [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(&first_bits, cur_dosage_start, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4917: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(&first_bits, cur_hds_start, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:4927: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(&second_bits, &(cur_hds_start[1]), 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:5320: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.
          memcpy(&phaseless_val, gt_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:5587: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.
          memcpy(&phaseless_val, gt_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:5795: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.
          memcpy(&phaseless_val, gt_iter, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6047: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.
          memcpy(&raw_val, gt_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6262: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.
          memcpy(&raw_val, gt_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6496: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.
          memcpy(&raw_val, gt_iter, 8);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6685: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(&gt_raw, &(gt_main[sample_idx * gt_value_ct]), 2);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6811:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char kBcfBytesPerElem[16] = {0, 1, 2, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0};
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6925:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_dosage_present, dosage_present, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6926:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_dosage_main, dosage_main, dosage_ct * sizeof(Dosage));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6928: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.
              memcpy(write_dphase_present, dphase_present, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6929: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.
              memcpy(write_dphase_delta, dphase_delta, dphase_ct * sizeof(SDosage));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6934: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(write_genovec, genovec, sample_ctl2 * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6936: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.
          memcpy(write_patch_01_set, patch_01_set, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6937: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.
          memcpy(write_patch_01_vals, patch_01_vals, patch_01_ct * sizeof(AlleleCode));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6940: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.
          memcpy(write_patch_10_set, patch_10_set, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6941: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.
          memcpy(write_patch_10_vals, patch_10_vals, patch_10_ct * sizeof(AlleleCode) * 2);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6944: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.
          memcpy(write_phasepresent, phasepresent, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6945: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.
          memcpy(write_phaseinfo, phaseinfo, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6997: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).
    bcffile = fopen(bcfname, FOPEN_RB);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7010:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char bgzf_header[16];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7024: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 prefix_buf[9];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7047: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(&header_size, &(prefix_buf[5]), sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7149: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(&(biallelic_gt_lookup[16]), biallelic_gt_lookup, 16);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8547: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.
              memcpy(&qual_f, &qual_bits, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8678:29:  [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(&cur_float, &cur_bits, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8721: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.
              memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, type_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8729: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.
              memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, vec_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8736:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, gt_type_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8743:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, gt_main_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8749:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, dosage_type_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8756:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, dosage_main_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8762:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, hds_type_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8769:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(geno_buf_iter[copy_vec_offset * kBytesPerVec]), src_iter, hds_main_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:8999: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 output_missing_pheno[kMaxMissingPhenostrBlen];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:9004: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(output_missing_pheno, g_output_missing_pheno, omp_slen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:10359: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(&compressed_block_byte_ct, compressed_geno_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:10461: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(&compressed_block_byte_ct, compressed_geno_iter, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:10547:3:  [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(&relevant_bits, &(prob_start[bit_offset / CHAR_BIT]), sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:10561:3:  [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(&relevant_bits, &(prob_start[bit_offset / CHAR_BIT]), sizeof(int64_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:10833: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(&stored_sample_ct, cur_uncompressed_geno, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:11309: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.
          memcpy(K_CAST(unsigned char*, cur_uncompressed_geno), grp->record_start, compressed_byte_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:11320: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(&stored_sample_ct, cur_uncompressed_geno, sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:12310: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.
          memcpy(bgen_geno_iter, &compressed_block_byte_ct, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:12636: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.
              memcpy(bgen_geno_iter, &compressed_block_byte_ct, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:13893:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char chr_buf[8];  // nothing longer than e.g. "chrMT" for now
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14602: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(&(variant_chr_codes[block_idx * kLoadMapBlockSize]), read_iter, kLoadMapBlockSize * sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14604: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(&(variant_bps[block_idx * kLoadMapBlockSize]), read_iter, kLoadMapBlockSize * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14606: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(&(variant_ids[block_idx * kLoadMapBlockSize]), read_iter, kLoadMapBlockSize * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14609: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(&(variant_cms[block_idx * kLoadMapBlockSize]), read_iter, kLoadMapBlockSize * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14614: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(&(variant_chr_codes[full_block_ct * kLoadMapBlockSize]), read_iter, variant_ct_lowbits * sizeof(int16_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14616: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(&(variant_bps[full_block_ct * kLoadMapBlockSize]), read_iter, variant_ct_lowbits * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14618: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(&(variant_ids[full_block_ct * kLoadMapBlockSize]), read_iter, variant_ct_lowbits * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14621: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(&(variant_cms[full_block_ct * kLoadMapBlockSize]), read_iter, variant_ct_lowbits * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14839: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 output_missing_pheno[kMaxMissingPhenostrBlen];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14842: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(output_missing_pheno, g_output_missing_pheno, omp_slen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:15738: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 chr1_name_buf[5];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:15828: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 output_missing_pheno[kMaxMissingPhenostrBlen];
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:15833: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(output_missing_pheno, g_output_missing_pheno, omp_slen);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:16349:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(smaj_loadbuf_iter, raw_loadbuf_iter, cur_vidx_ct4);
data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc:1598: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(new_variant_include, orig_variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc:3220:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(write_iter, cur_allele, final_char_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix.cc:1357:3:  [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(fitted_coefs_phenomaj, xt_y_phenomaj, predictor_ct * pheno_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:683: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(idx_buf_iters, idx_bufs, 4 * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:1380: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(variant_include_next, variant_include_orig, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:1538: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(cur_sample_include, sample_include, raw_sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:1562: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(variant_include, variant_include_orig, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2561: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(idbuf, fid_start, fid_slen);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2621: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(idbuf, fid_start, fid_slen);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2715: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(g_textbuf, subset_fname, fname_slen);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:3985: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(new_sample_include, orig_sample_include, RoundUpPow2(sample_uidx_end, kBitsPerWord) / CHAR_BIT);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:5181: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.
          memcpy(g1, ctx.g2_bb_part_bufs[0], gg_size * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:5270: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(&(eigvecs_smaj[sample_idx * S_CAST(uintptr_t, pc_ct)]), &(bb[sample_idx * qq_col_ct]), pc_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:5723: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.
          memcpy(variant_include_no_x, variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:6359: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.
          memcpy(missing_male_acc1, missing_acc1, sample_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7308:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(cur_results_f[cur_bidx * vscore_ct]), tmp_f_result_iter, vscore_ct * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7316:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(cur_results_d[cur_bidx * vscore_ct]), tmp_d_result_iter, vscore_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7420: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.
          memcpy(&(cur_results_f[cur_bidx * vscore_ct]), tmp_f_result_iter, vscore_ct * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7428: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.
          memcpy(&(cur_results_d[cur_bidx * vscore_ct]), tmp_d_result_iter, vscore_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7475: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.
          memcpy(variant_include_no_x, variant_include, raw_variant_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7780: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.
          memcpy(&(wts_f_smaj[sample_idx * vscore_ct]), wts_read_iter, vscore_ct * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:7790: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.
          memcpy(&(wts_d_smaj[sample_idx * vscore_ct]), wts_read_iter, vscore_ct * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:245: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(variant_ids_copy, variant_ids, raw_variant_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:335: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(alloc_base, cur_var_id, colold_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:515:13:  [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(outname_end, ".allele.no.snp");
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:662: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(variant_ids_copy, variant_ids, raw_variant_ct * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:997: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.
          memcpy(alloc_base, old_id, old_id_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1026: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(outname_end, ".recoverid.dup");
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1053:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(cur_id, missing_varid, missing_varid_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1059:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(alloc_end, missing_varid, missing_varid_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1165: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(pheno_names, old_pheno_names, old_pheno_ct * new_max_pheno_name_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1171: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(&(pheno_names[old_pheno_ct * new_max_pheno_name_blen]), catpheno_name, catpheno_name_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1193: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(cat_nm, sample_include, raw_sample_ctaw * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1517: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(catdata_iter, cat_nm, raw_sample_ctaw * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2013: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.
          memcpy(&(siip->sample_ids[sample_uidx * max_sample_id_blen]), new_sample_id, new_sample_id_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2016:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(siip->sids[sample_uidx * max_sid_blen]), new_sid, new_sid_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2638: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(&(new_pheno_cols[pheno_write_idx]), &(doomed_pheno_cols[pheno_read_idx]), sizeof(PhenoCol));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2679: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.
          memcpy(new_pheno_data_iter, sample_include_intersect, raw_sample_ctaw * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:4217:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char nobs_strs[2][16];
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:4375:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char nobs_str[16];
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:4941: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(chr_skips, cip->haploid_mask, chr_code_endl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:5183:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char x_name_buf[8];
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:6330:3:  [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(unscramble_buf, dst, acc2_vec_ct * 16 * kBytesPerVec);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:6402: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.
  const char sample_counts_headers[kSampleCountTypeCt][30] = {
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7228: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(dst, hapref_vals, sample_ct * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7243: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(dst, hapalt_vals, sample_ct * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7329: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(&type_bitarr, &flags, 4);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10243:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char g_cc_cat_names[2][8] = {"CONTROL", "CASE"};
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10403:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(cats_seen, pop_include, raw_cat_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10531: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.
          memcpy(cats_seen, pop_include, raw_cat_ctl * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10699:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(tmp_variant_include[start_widx]), &(orig_variant_include[start_widx]), (end_widx - start_widx) * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:424:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(new_entry->str, missing_catname, missing_catname_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:561:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(pheno_data[pheno_idx * 8]), &htable_idx, sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:584: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(&(pheno_data[pheno_idx * 8]), &dxx, sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:745: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.
          memcpy(&cur_cat, &(cur_vardata[pheno_idx * 8]), sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:752: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.
          memcpy(&dxx, &(cur_vardata[pheno_idx * 8]), sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:1223:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(new_entry->str, missing_catname, missing_catname_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:1293:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&(pheno_data[new_pheno_idx]), &htable_idx, sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:1421:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&cur_cat, &(pheno_data[new_pheno_idx]), sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:293: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(*tmp_alloc_endp, vtp->missing_id_match, overflow_substitute_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:317:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(insert_ptrs[0], vtp->chr_output_name_buf, insert_slens[0]);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:321: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(insert_ptrs[insert_type_idx], tmp_allele_ptrs[insert_type_idx - 2], insert_slens[insert_type_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:408:3:  [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(insert_ptrs[0], vtp->chr_output_name_buf, insert_slens[0]);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:412: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(insert_ptrs[insert_type_idx], tmp_allele_ptrs[insert_type_idx - 2], insert_slens[insert_type_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1733: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.
                  memcpy(cur_chr_idxs, cur_cms, kLoadPvarBlockSize * sizeof(ChrIdx));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1893: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(&(variant_bps[block_idx * kLoadPvarBlockSize]), read_iter, kLoadPvarBlockSize * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1896: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(&(variant_ids[block_idx * kLoadPvarBlockSize]), read_iter, kLoadPvarBlockSize * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1898: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(&(variant_include[block_idx * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, kLoadPvarBlockSize / CHAR_BIT);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1901: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(&(qual_present[block_idx * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, kLoadPvarBlockSize / CHAR_BIT);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1903: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(&(quals[block_idx * kLoadPvarBlockSize]), read_iter, kLoadPvarBlockSize * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1907: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(&(filter_present[block_idx * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, kLoadPvarBlockSize / CHAR_BIT);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1909: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(&(filter_npass[block_idx * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, kLoadPvarBlockSize / CHAR_BIT);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1912: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.
          memcpy(&(filter_storage[block_idx * kLoadPvarBlockSize]), read_iter, kLoadPvarBlockSize * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1917: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(&(nonref_flags[block_idx * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, kLoadPvarBlockSize / CHAR_BIT);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1929: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(&(variant_bps[full_block_ct * kLoadPvarBlockSize]), read_iter, raw_variant_ct_lowbits * sizeof(int32_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1931: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(&(variant_ids[full_block_ct * kLoadPvarBlockSize]), read_iter, raw_variant_ct_lowbits * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1934: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(&(variant_include[full_block_ct * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, last_bitblock_size);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1938: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(&(qual_present[full_block_ct * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, last_bitblock_size);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1941: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(&(quals[full_block_ct * kLoadPvarBlockSize]), read_iter, raw_variant_ct_lowbits * sizeof(float));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1945: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(&(filter_present[full_block_ct * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, last_bitblock_size);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1948: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(&(filter_npass[full_block_ct * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, last_bitblock_size);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1952: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(&(filter_storage[full_block_ct * kLoadPvarBlockSize]), read_iter, raw_variant_ct_lowbits * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1957: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(&(nonref_flags[full_block_ct * (kLoadPvarBlockSize / kBitsPerWord)]), read_iter, last_bitblock_size);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1969: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(&(allele_idx_offsets[block_idx * kLoadPvarBlockSize]), allele_idx_read_iter, kLoadPvarBlockSize * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1972: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(&(allele_idx_offsets[full_block_ct * kLoadPvarBlockSize]), allele_idx_read_iter, raw_variant_ct_lowbits * sizeof(intptr_t));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1986: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(&(variant_cms[block_idx * kLoadPvarBlockSize]), cms_read_iter, kLoadPvarBlockSize * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1989: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(&(variant_cms[full_block_ct * kLoadPvarBlockSize]), cms_read_iter, raw_variant_ct_lowbits * sizeof(double));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:2024: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(&(chr_idxs[block_idx * kLoadPvarBlockSize]), chr_idxs_read_iter, kLoadPvarBlockSize * sizeof(ChrIdx));
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:2028: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(&(chr_idxs[full_block_ct * kLoadPvarBlockSize]), chr_idxs_read_iter, raw_variant_ct_lowbits * sizeof(ChrIdx));
data/plink2-2.00~a3-201028+dfsg/plink2_set.cc:104: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.
          memcpy(ll_tmp->str, last_token, set_id_blen);
data/plink2-2.00~a3-201028+dfsg/plink2_set.cc:110: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.
          memcpy(&(ll_tmp->str[kMaxChrCodeDigits]), last_token, set_id_blen - kMaxChrCodeDigits);
data/plink2-2.00~a3-201028+dfsg/include/plink2_base.h:494:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#    define getc_unlocked getc
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:734: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).
    const uint32_t cur_slen = strlen(cur_str);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.cc:1982: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).
    const uintptr_t blen = strlen(multistr) + 1;
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:185: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).
  return S_CAST(CXXCONST_CP, &(str[strlen(str)]));
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:311: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).
  const uintptr_t slen = strlen(S_CAST(const char*, src));
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:316: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).
  const uintptr_t slen = strlen(S_CAST(const char*, src));
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:330:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  uintptr_t slen = strlen(src);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:369: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).
  const uint32_t s2_slen = strlen(k_s2);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:376: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).
  const uint32_t s2_blen = 1 + strlen(k_s2);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:417: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).
  const uint32_t s_const_slen = strlen(s_const);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:423: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).
  const uint32_t s_const_slen = strlen(s_prefix_const);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:429: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).
  const uint32_t s_const_slen = strlen(s_prefix_const);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:436: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).
  const uint32_t s_const_slen = strlen(s_prefix_const);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:442: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).
  const uint32_t s_const_slen = strlen(s_suffix_const);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:889: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).
  const uint32_t fixed_slen = strlen(fixed_str);
data/plink2-2.00~a3-201028+dfsg/include/plink2_string.h:897:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return MatchUpperCounted(str, fixed_str, strlen(fixed_str));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:747: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_slen = strlen(pgenname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:754: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_slen = strlen(pvarname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:762: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_slen = strlen(psamname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:921: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).
            fname_slen = strlen(pvarname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:935: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).
            fname_slen = strlen(pvarname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1639:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uintptr_t name_blen = 1 + strlen(loop_cats_phenoname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:1730:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t catname_slen = strlen(catname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2769:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  uint32_t fname_blen = strlen(sources[0]) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2835: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).
    tot_blen += 1 + strlen(cur_param_iter);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2907:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_modif2_slen = strlen(cur_modif2);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:2969:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_modif2_slen = strlen(cur_modif2);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3077:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const uint32_t mode_slen = strlen(mode_str);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3120: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).
    const uint32_t argv1_slen = strlen(argv1);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3273: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).
        const uint32_t flag_slen = strlen(flagname_p);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3685:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3722:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3968: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).
          const uint32_t slen = strlen(fname_prefix);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:3999: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).
          const uint32_t slen = strlen(fname_prefix);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4021:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4026:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            reterr = CmdlineAllocString(&(cur_modif[strlen("dosage=")]), argvk[arg_idx], 4095, &vcf_dosage_import_field);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4045: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).
          const uint32_t slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4065:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4086: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).
          const uint32_t slen = strlen(cur_fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4225:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4256:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4338:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4422:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4446: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).
          const uint32_t slen = strlen(fname_prefix);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4491:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4499:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* pheno_ct_start = &(cur_modif[strlen("pheno-ct=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4507:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* dosage_freq_start = &(cur_modif[strlen("dosage-freq=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4572:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4599:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4626:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4685:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4691:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("id-paste=")]), "maybefid\0fid\0iid\0maybesid\0sid\0", "export", kfIdpasteMaybefid, kfIdpasteDefault, 1, &pc.exportf_info.idpaste_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4700:71:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              pc.exportf_info.id_delim = ExtractCharParam(&(cur_modif[strlen("id-delim=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4718:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* vcf_dosage_start = &(cur_modif[strlen("vcf-dosage=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4719:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const uint32_t vcf_dosage_start_slen = strlen(vcf_dosage_start);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4747:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* bits_start = &(cur_modif[strlen("bits=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:4992:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5123:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5158:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5189:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("cols=")]), "nobs\0", "fst cols", kfFstColNobs, kfFstColDefault, 0, &pc.fst_info.flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5203:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("vcols=")]), "chrom\0pos\0ref\0alt\0nobs\0nallele\0fstfrac\0fst\0", "fst vcols", kfFstVcolChrom, kfFstVcolDefault, 0, &pc.fst_info.flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5333:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5372:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5449:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = AllocFname(&(cur_modif[strlen("local-covar=")]), "glm local-covar=", 0, &pc.glm_local_covar_fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5480:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* cur_modif_iter = &(cur_modif[strlen("local-pos-cols=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5514:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              if (unlikely(ScanPosintCappedx(&(cur_modif[strlen("local-cats=")]), 4095, &pc.glm_info.local_cat_ct) || (pc.glm_info.local_cat_ct == 1))) {
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5524:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              if (unlikely(ScanPosintCappedx(&(cur_modif[strlen("local-cats0=")]), 4095, &pc.glm_info.local_cat_ct) || (pc.glm_info.local_cat_ct == 1))) {
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5633:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5646: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).
          const uint32_t slen = strlen(cur_fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5679:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5779:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5812:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5824: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).
          const uint32_t slen = strlen(cur_fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:5843:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t mode_slen = strlen(mode_str);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6030:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6073:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* id_delim_str = &(cur_modif[strlen("id-delim=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6085: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).
              const char* chr_code = &(cur_modif[strlen("single-chr=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6101:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* chr_col_num_start = &(cur_modif[strlen("chr-col-num=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6113:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* pos_col_num_start = &(cur_modif[strlen("pos-col-num=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6176: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).
          const uint32_t slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6407:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          uint32_t slen = strlen(cur_fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6504:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6517:76:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* mode_start = (cur_modif[1] == '=')? (&(cur_modif[strlen("m=")])) : (&(cur_modif[strlen("multiallelics=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6517:107:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* mode_start = (cur_modif[1] == '=')? (&(cur_modif[strlen("m=")])) : (&(cur_modif[strlen("multiallelics=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6572:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6598:76:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* mode_start = (cur_modif[1] == '=')? (&(cur_modif[strlen("m=")])) : (&(cur_modif[strlen("multiallelics=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6598:107:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* mode_start = (cur_modif[1] == '=')? (&(cur_modif[strlen("m=")])) : (&(cur_modif[strlen("multiallelics=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6692:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6701:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("pvar-cols=")]), "xheader\0vcfheader\0maybequal\0qual\0maybefilter\0filter\0maybeinfo\0info\0maybecm\0cm\0", "make-pgen pvar-cols", kfPvarColXheader, kfPvarColDefault, 0, &pc.pvar_psam_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6772:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("psam-cols=")]), "maybefid\0fid\0maybesid\0sid\0maybeparents\0parents\0sex\0pheno1\0phenos\0", "make-pgen psam-cols", kfPsamColMaybefid, kfPsamColDefault, 0, &pc.pvar_psam_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6855:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6896:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6926:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:6990:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7043:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7063:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("scols=")]), "maybefid\0fid\0maybesid\0sid\0misspheno1\0missphenos\0nmissdosage\0nmiss\0nmisshh\0hethap\0nobs\0fmissdosage\0fmiss\0fmisshh\0", "missing scols", kfMissingRptScolMaybefid, kfMissingRptScolDefault, 1, &pc.missing_rpt_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7072:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("vcols=")]), "chrom\0pos\0ref\0alt\0nmissdosage\0nmiss\0nmisshh\0hethap\0nobs\0fmissdosage\0fmiss\0fmisshh\0fhethap\0", "missing vcols", kfMissingRptVcolChrom, kfMissingRptVcolDefault, 1, &pc.missing_rpt_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7478:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7514:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7551:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7607:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7673: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).
          const uint32_t slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7826:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7895:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t code_slen = strlen(mt_code);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7961:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:7989: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).
          const uint32_t slen = strlen(fname_prefix);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8011: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).
          const uint32_t slen = strlen(fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8026: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).
          const uint32_t slen = strlen(fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8041: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).
          const uint32_t slen = strlen(fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8150:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8166:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("scols=")]), "maybefid\0fid\0maybesid\0sid\0", "pca scols", kfPcaScolMaybefid, kfPcaScolDefault, 0, &pc.pca_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8242:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("vcols=")]), "chrom\0pos\0ref\0alt1\0alt\0ax\0maj\0nonmaj\0", "pca vcols", kfPcaVcolChrom, default_cols, is_var_wts, &pc.pca_flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8321:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8513:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8542:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8578:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8657:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t code_slen = strlen(build_code);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8760: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).
          const uint32_t slen = strlen(cur_fname);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8828:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8937:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8960:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const uint32_t cur_phenoname_slen = strlen(phenonames_iter);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:8985:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t mode_slen = strlen(mode_str);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9012:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9018:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              sdiff_id_delim = ExtractCharParam(&(cur_modif[strlen("id-delim=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9056:75:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              pc.sdiff_info.fname_id_delim = ExtractCharParam(&(cur_modif[strlen("fname-id-delim=")]));
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9078:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              reterr = ParseColDescriptor(&(cur_modif[strlen("counts-cols=")]), "maybefid\0fid\0maybesid\0sid\0nobs\0nobsibs\0ibs0\0ibs1\0ibs2\0halfmiss\0diff\0", "sample-diff counts-cols=", kfSdiffCountsColMaybefid, kfSdiffCountsColDefault, 1, &pc.sdiff_info.flags);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9184:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9391:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9395:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const char* col_num_start = &(cur_modif[strlen("col-num=")]);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9517:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9539: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).
          const uint32_t slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9618:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t mode_slen = strlen(mode_str);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9699:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9763:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9815:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:9840:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_modif_slen = strlen(cur_modif);
data/plink2-2.00~a3-201028+dfsg/plink2.cc:10165:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            } else if (unlikely(!IsNanStr(g_output_missing_pheno, strlen(g_output_missing_pheno)))) {
data/plink2-2.00~a3-201028+dfsg/plink2_adjust.cc:646: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).
      test_name_slen = strlen(test_name);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:796:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  uintptr_t blen = strlen(str) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:832: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).
    const uintptr_t blen = strlen(multistr) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1197: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).
  const uint32_t id_blen = strlen(idstr) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:1392:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const uint32_t slen = strlen(strbox_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:2486:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const uint32_t slen = strlen(sptr);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:2656: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).
      const uint32_t slen = strlen(sptr);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:2886: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).
      const uint32_t slen = strlen(sptr);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3098: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).
      const uint32_t cur_slen = strlen(params_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3187:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t payload_slen = strlen(payload);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3296:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const uint32_t slen = strlen(source);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3310:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const uint32_t blen = strlen(source) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3325: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).
    const uint32_t cur_blen = 1 + strlen(sources[param_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3385:78:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    while ((!StrStartsWithUnsafe(textbuf, "Options in effect:")) || (textbuf[strlen("Options in effect:")] >= ' ')) {
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3460: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).
            const uint32_t slen2 = strlen(later_flagname_p);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3702:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t flagname_p_slen = strlen(flagname_p);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3861: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).
        if (unlikely(strlen(argvk[arg_idx + 1]) > (kPglFnamesize - kMaxOutfnameExtBlen))) {
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:3866: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).
        const uint32_t slen = strlen(argvk[arg_idx + 1]);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4134:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      pheno_name_slen = strlen(pheno_name_start);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4136: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).
      uint32_t op_slen = strlen(op_str);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4151: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).
      pheno_val_slen = strlen(pheno_val_start);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4154: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).
      uint32_t expr_slen = strlen(pheno_name_start);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4251: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).
        const uint32_t cur_blen = strlen(multistr_iter) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4346: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).
      const uint32_t blen = 1 + strlen(supported_ids_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_cmdline.cc:4361: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).
      const uint32_t blen = strlen(supported_ids_iter) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_common.cc:1502: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).
      const uint32_t name_slen = strlen(cip->nonstd_names[chr_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_common.h:1123: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).
  const uint32_t ext_slen = strlen(ext);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:315:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_bp_end = cur_bp + strlen(allele_storage[allele_idx_offset_base]) - 1;
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:337:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t cur_bp_end = cur_bp + strlen(allele_storage[allele_idx_offset_base]) - 1;
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:361:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const uint32_t cur_bp_end = cur_bp + strlen(allele_storage[allele_idx_offset_base]) - 1;
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:812: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).
    const uint32_t lomp_slen = strlen(legacy_output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:964: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).
    const uint32_t omp_slen = strlen(output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:1004:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_pheno_name_slen = strlen(cur_pheno_name);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:3336: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).
      missing_varid_slen = strlen(missing_varid_match);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:3392:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t ref_allele_slen = strlen(ref_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:3424:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_alt_allele_slen = strlen(cur_alt_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:3668: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).
    uint32_t missing_varid_slen = strlen(missing_varid_match);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:3839:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t ref_allele_slen = strlen(ref_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:3948:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_alt_allele_slen = strlen(cur_alt_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_data.cc:4263:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      for (uint32_t hashval = Hashceil(filter_keys[uii], strlen(filter_keys[uii]), filter_keys_htable_size); ; ) {
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1911: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).
          const uint32_t id_slen = strlen(cur_variant_id);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1940: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).
          uint32_t allele_slen = strlen(first_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:1943:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          allele_slen = strlen(second_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3199: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).
      const uint32_t iid_slen = strlen(orig_iid);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3208: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).
        const uint32_t sid_slen = strlen(orig_sid);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3345:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sample_id_block_len += strlen(exported_sample_ids_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3362: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).
        const uint16_t cur_slen = strlen(exported_sample_ids_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3533: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).
          const uint32_t id_slen = strlen(cur_variant_id);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3552:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t ref_allele_slen = strlen(ref_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3564:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          uint32_t alt_allele_slen = strlen(cur_alt_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3576: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).
              alt_allele_slen = strlen(cur_alt_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:3839: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).
          const uint32_t cur_slen = strlen(cat_names[cat_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:6249:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const uint32_t slen = strlen(ss);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7523: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).
  const uint32_t variant_id_slen = strlen(variant_id);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7621:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        header_ubound += 37 + kMaxChrCodeDigits + strlen(EOLN_STR);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7626: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).
          header_ubound += strlen(cip->nonstd_names[chr_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7687:80:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        reterr = AddToFifHtable(g_bigstack_base, "PASS", fif_keys_htable_size, strlen("PASS"), 8, &tmp_alloc_end, fif_keys_mutable, fif_keys_htable, &fif_key_ct, &cur_idx);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7896:80:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          reterr = AddToFifHtable(g_bigstack_base, "PR", fif_keys_htable_size, strlen("PR"), 1, &tmp_alloc_end, fif_keys_mutable, fif_keys_htable, &fif_key_ct, &pr_key_idx);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7903:96:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          pr_key_idx = IdHtableFind("PR", TO_CONSTCPCONSTP(fif_keys_mutable), fif_keys_htable, strlen("PR"), fif_keys_htable_size);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7907:94:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      end_key_idx = IdHtableFind("END", TO_CONSTCPCONSTP(fif_keys_mutable), fif_keys_htable, strlen("END"), fif_keys_htable_size);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7916:78:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        reterr = AddToFifHtable(g_bigstack_base, "DS", fif_keys_htable_size, strlen("DS"), 0, &tmp_alloc_end, fif_keys_mutable, fif_keys_htable, &fif_key_ct, &dosage_key_idx);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7926:81:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          reterr = AddToFifHtable(g_bigstack_base, "HDS", fif_keys_htable_size, strlen("HDS"), 0, &tmp_alloc_end, fif_keys_mutable, fif_keys_htable, &fif_key_ct, &hds_key_idx);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7935:78:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        reterr = AddToFifHtable(g_bigstack_base, "GP", fif_keys_htable_size, strlen("GP"), 0, &tmp_alloc_end, fif_keys_mutable, fif_keys_htable, &fif_key_ct, &dosage_key_idx);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:7946:76:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      reterr = AddToFifHtable(g_bigstack_base, "GT", fif_keys_htable_size, strlen("GT"), 0, &tmp_alloc_end, fif_keys_mutable, fif_keys_htable, &fif_key_ct, &gt_key_idx);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8054:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            cur_ubound += strlen(cur_alleles[allele_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:8418:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      uint32_t rlen = strlen(ref_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:9576: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).
      const uint32_t cur_slen = strlen(cur_var_id);
data/plink2-2.00~a3-201028+dfsg/plink2_export.cc:9667: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).
    const uint32_t lomp_slen = strlen(legacy_output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_fasta.cc:103:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t cur_allele_slen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_fasta.cc:238: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).
      const uint32_t alen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:51:112:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      variant_uidx_start = VariantIdDupHtableFind(varid_from, variant_ids, variant_id_htable, htable_dup_base, strlen(varid_from), variant_id_htable_size, max_variant_id_slen, &cur_llidx);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:67:108:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      variant_uidx_end = VariantIdDupHtableFind(varid_to, variant_ids, variant_id_htable, htable_dup_base, strlen(varid_to), variant_id_htable_size, max_variant_id_slen, &cur_llidx);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:129:112:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint32_t variant_uidx = VariantIdDupHtableFind(varid_snp, variant_ids, variant_id_htable, htable_dup_base, strlen(varid_snp), variant_id_htable_size, max_variant_id_slen, &cur_llidx);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:223:114:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      uint32_t variant_uidx = VariantIdDupHtableFind(cur_varid, variant_ids, variant_id_htable, htable_dup_base, strlen(cur_varid), variant_id_htable_size, max_variant_id_slen, &cur_llidx);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:707: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).
    const uint32_t missing_varid_blen = strlen(missing_varid_match) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:834:126:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t variant_uidx_ll_first = VariantIdDupHtableFind(cur_id, variant_ids, variant_id_htable, htable_dup_base, strlen(cur_id), variant_id_htable_size, max_variant_id_slen, &first_llidx);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1454:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t col_name_slen = strlen(col_name);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1585:88:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const int32_t ii = bsearch_strbox(cur_pheno_name, sorted_required_pheno_names, strlen(cur_pheno_name), max_required_pheno_blen, required_pheno_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1627: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).
    const uintptr_t name_blen = 1 + strlen(cur_name);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1670: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).
    const uint32_t val_slen = strlen(cur_val_str);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:1902:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cat_name_slen = strlen(cat_names_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_filter.cc:2000:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uintptr_t name_blen = 1 + strlen(cat_phenoname);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1602:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t covar_name_base_slen = strlen(covar_name_base);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:1609:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t catname_slen = strlen(catname);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:4935: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).
      covar_name_total_blen += strlen(covar_names[covar_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_glm.cc:11150:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t condition_blen = strlen(glm_info_ptr->condition_varname) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_help.cc:78:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      help_ctrl.param_slens[arg_idx] = strlen(help_ctrl.argv[arg_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:326: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).
    isicp->const_fid_slen = strlen(const_fid);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2685: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).
        const uint32_t slen = strlen(vcfname);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2710: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).
      dosage_import_field_slen = strlen(dosage_import_field);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2830:59:  [1] (buffer) strlen:
  Does not handle 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 (unlikely(!StrStartsWithUnsafe(&(line_iter[2 + strlen("FORMAT=<ID=GT,Number=")]), "1,Type=String,Description="))) {
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2866:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (StrStartsWithUnsafe(&(line_iter[2 + strlen("INFO=<ID=")]), "PR,Number=")) {
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2871:74:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          info_pr_nonflag_present = !StrStartsWithUnsafe(&(line_iter[2 + strlen("INFO=<ID=PR,Number=")]), "0,Type=Flag,Description=");
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2923:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char* linebuf_iter = &(line_iter[strlen("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO")]);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:2926:141:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      reterr = VcfSampleLine(preexisting_psamname, const_fid, misc_flags, import_flags, fam_cols, id_delim, idspace_to, 'v', &(linebuf_iter[strlen("\tFORMAT\t")]), outname, outname_end, &sample_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:3327:47:  [1] (buffer) strlen:
  Does not handle 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* contig_name_start = &(line_iter[strlen("##contig=<ID=")]);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:6999: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).
      const uint32_t slen = strlen(bcfname);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7084: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).
      dosage_import_field_slen = strlen(dosage_import_field);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7336:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      char* linebuf_iter = &(line_iter[strlen("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO")]);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7338:143:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        reterr = VcfSampleLine(preexisting_psamname, const_fid, misc_flags, import_flags, fam_cols, id_delim, idspace_to, 'b', &(linebuf_iter[strlen("\tFORMAT\t")]), outname, outname_end, &sample_ct);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7399:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (StoreStringAtEndK(g_bigstack_base, "PASS", strlen("PASS"), &tmp_alloc_end, &(fif_strings[0]))) {
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7501:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (unlikely(!StrStartsWithUnsafe(&(id_start[strlen("GT,Number=")]), "1,Type=String,Description="))) {
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:7758:74:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          reterr = GetOrAddChrCode(contig_names[chrom], "--bcf file", 0, strlen(contig_names[chrom]), allow_extra_chrs, cip, &cur_chr_code);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:9003: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).
      omp_slen = strlen(g_output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:9010: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).
    uint32_t missing_catname_slen = strlen(missing_catname);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:9019: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).
        const uint32_t slen = strlen(samplename);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:9752: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).
    const uint32_t chr_slen = strlen(ox_single_chr_str);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:9825: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).
        const uint32_t slen = strlen(genname);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:13897:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        single_chr_slen = strlen(ox_single_chr_str);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14841: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).
      omp_slen = strlen(g_output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:14964: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).
          single_chr_slen = strlen(import_single_chr_str);
data/plink2-2.00~a3-201028+dfsg/plink2_import.cc:15832: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).
      omp_slen = strlen(g_output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc:3187:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t cur_varid_slen = strlen(ld_console_varids[var_idx]);
data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc:3197: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).
      const uint32_t maj_slen = strlen(maj_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc:3215: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).
        const uint32_t cur_slen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_ld.cc:3241: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).
        const uint32_t ref_slen = strlen(ref_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:292:45:  [1] (buffer) strlen:
  Does not handle 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* fprefix_end = &(king_cutoff_fprefix[strlen(king_cutoff_fprefix)]);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:1952:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t sample_fmtid1_slen = strlen(sample_fmtid1);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2067:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      write_iter = memcpya(write_iter, outname, outname_base_slen + strlen(outname_end));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2086:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      write_iter = memcpya(write_iter, outname, outname_base_slen + strlen(outname_end));
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:2714: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_slen = strlen(subset_fname);
data/plink2-2.00~a3-201028+dfsg/plink2_matrix_calc.cc:6726: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).
      const uint32_t omp_slen = strlen(output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:777: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).
      missing_varid_blen = 1 + strlen(missing_varid);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:979:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t old_id_slen = strlen(old_id);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1051:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_id_slen = strlen(cur_id);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1141: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).
      catpheno_name_blen = 1 + strlen(catpheno_name);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1203:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const uint32_t missing_catname_slen = strlen(missing_catname);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1388:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_catname_blen = 1 + strlen(cat_name_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:1424:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        family_missing_catname_slen = strlen(family_missing_catname);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2478:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_phenoname_slen = strlen(split_cat_phenonames_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2560:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uintptr_t blen_base = strlen(&(old_pheno_names[split_pheno_uidx * old_max_pheno_name_blen])) + 2;
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2568:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const uint32_t cur_slen = strlen(cur_cat_name);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2661:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t old_pheno_name_slen = strlen(old_pheno_name);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2813:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_phenoname_slen = strlen(vstd_phenonames_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:2942:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const uint32_t cur_phenoname_slen = strlen(quantnorm_phenonames_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7877: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).
    const uint32_t allele_slen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7888: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).
      const uint32_t allele_slen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7959: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).
        const uint32_t slen1 = strlen(sample_fmtid1);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:7960: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).
        const uint32_t slen2 = strlen(sample_fmtid2);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:8006: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).
        const uint32_t base_slen = strlen(sample_fmtid);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:8986: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).
    const uint32_t omp_slen = strlen(output_missing_pheno);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:9057:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const uint32_t cur_pheno_name_slen = strlen(pheno_name_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:9112:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const uint32_t cur_covar_name_slen = strlen(cur_covar_name);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10268: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).
      const uint32_t pheno_blen = strlen(pheno_name) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10821:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const uint32_t slen1 = strlen(pop_names[pop_idx1]);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:10822:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              const uint32_t slen2 = strlen(pop_names[pop_idx2]);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:11119: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).
                    const uint32_t allele_slen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_misc.cc:11129:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                      const uint32_t allele_slen = strlen(cur_allele);
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:353:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const uint32_t missing_catname_blen = strlen(missing_catname) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_psam.cc:1156:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const uint32_t missing_catname_blen = strlen(missing_catname) + 1;
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:64:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (unlikely(ScanPosintCapped(&(chrset_iter[strlen("haploidAutosomeCt=")]), kMaxChrTextnum, &explicit_haploid_ct))) {
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:86: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).
      chrset_iter = &(chrset_iter[strlen("autosomePairCt=")]);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:496: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).
    const uintptr_t slen = strlen(read_iter);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:669:12:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return mismatch ^ (binary_op != kCmpOperatorNoteq);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:863:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        info_pr_nonflag_present = !StrStartsWithUnsafe(&(line_start[strlen("##INFO=<ID=PR,Number=")]), "0,Type=Flag,Description=");
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:878:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        reterr = ReadChrsetHeaderLine(&(line_start[strlen("##chrSet=<")]), pvarname, misc_flags, line_idx, cip);
data/plink2-2.00~a3-201028+dfsg/plink2_pvar.cc:1176: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).
      missing_varid_blen = strlen(missing_varid_match);

ANALYSIS SUMMARY:

Hits = 958
Lines analyzed = 150656 in approximately 3.84 seconds (39253 lines/second)
Physical Source Lines of Code (SLOC) = 127392
Hits@level = [0] 940 [1] 294 [2] 609 [3]  13 [4]  42 [5]   0
Hits@level+ = [0+] 1898 [1+] 958 [2+] 664 [3+]  55 [4+]  42 [5+]   0
Hits/KSLOC@level+ = [0+] 14.8989 [1+] 7.5201 [2+] 5.21226 [3+] 0.431738 [4+] 0.329691 [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.