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/qfits-6.2.0/qfits.h
Examining data/qfits-6.2.0/src/qfits_cache.h
Examining data/qfits-6.2.0/src/qfits_filename.h
Examining data/qfits-6.2.0/src/qfits_header.h
Examining data/qfits-6.2.0/src/qfits_image.h
Examining data/qfits-6.2.0/src/qfits_memory.h
Examining data/qfits-6.2.0/src/qfits_md5.h
Examining data/qfits-6.2.0/src/qfits_rw.h
Examining data/qfits-6.2.0/src/qfits_std.h
Examining data/qfits-6.2.0/src/qfits_table.h
Examining data/qfits-6.2.0/src/qfits_time.h
Examining data/qfits-6.2.0/src/qfits_tools.h
Examining data/qfits-6.2.0/src/qfits_byteswap.h
Examining data/qfits-6.2.0/src/qfits_card.h
Examining data/qfits-6.2.0/src/qfits_error.h
Examining data/qfits-6.2.0/src/qfits_float.h
Examining data/qfits-6.2.0/src/md5.h
Examining data/qfits-6.2.0/src/qfits_byteswap.c
Examining data/qfits-6.2.0/src/qfits_cache.c
Examining data/qfits-6.2.0/src/qfits_card.c
Examining data/qfits-6.2.0/src/qfits_error.c
Examining data/qfits-6.2.0/src/qfits_float.c
Examining data/qfits-6.2.0/src/qfits_header.c
Examining data/qfits-6.2.0/src/qfits_image.c
Examining data/qfits-6.2.0/src/qfits_md5.c
Examining data/qfits-6.2.0/src/qfits_rw.c
Examining data/qfits-6.2.0/src/qfits_table.c
Examining data/qfits-6.2.0/src/qfits_time.c
Examining data/qfits-6.2.0/src/qfits_tools.c
Examining data/qfits-6.2.0/src/md5.c
Examining data/qfits-6.2.0/src/qfits_memory.c
Examining data/qfits-6.2.0/src/qfits_filename.c
Examining data/qfits-6.2.0/main/dtfits.c
Examining data/qfits-6.2.0/main/flipx.c
Examining data/qfits-6.2.0/main/qextract.c
Examining data/qfits-6.2.0/main/replacekey.c
Examining data/qfits-6.2.0/main/frameq.c
Examining data/qfits-6.2.0/main/dfits.c
Examining data/qfits-6.2.0/saft/fitsmd5.c
Examining data/qfits-6.2.0/saft/fitsort.c
Examining data/qfits-6.2.0/saft/iofits.c
Examining data/qfits-6.2.0/saft/stripfits.c
Examining data/qfits-6.2.0/saft/hierarch28.c
Examining data/qfits-6.2.0/test/pixset.h
Examining data/qfits-6.2.0/test/test_pixio.c
Examining data/qfits-6.2.0/test/test_qfits.c
Examining data/qfits-6.2.0/test/test_tfits.c
Examining data/qfits-6.2.0/test/test_xmem.c
Examining data/qfits-6.2.0/test/test_xmem_stress.c

FINAL RESULTS:

data/qfits-6.2.0/main/dtfits.c:112: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(name_i, argv[i]);
data/qfits-6.2.0/main/dtfits.c:115:10:  [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).
    else strcpy(name_o, argv[i]);
data/qfits-6.2.0/main/dtfits.c:334:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:342:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:346:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:355:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:359:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:368:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:372:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:380:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:384:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:392:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:396:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:404:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:408:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:416:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:420:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:428:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                        strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:432:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:517:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:523:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:530:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/dtfits.c:536:21:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                    strcat(str, ctmp) ;
data/qfits-6.2.0/main/frameq.c:270:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s/*.fits", dirname);
data/qfits-6.2.0/main/frameq.c:272:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s/*.FITS", dirname);
data/qfits-6.2.0/main/frameq.c:274:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s/*.fits.gz", dirname);
data/qfits-6.2.0/main/frameq.c:276:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s/*.FITS.gz", dirname);
data/qfits-6.2.0/main/frameq.c:372:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(pattern, "%s/set*", dirname);
data/qfits-6.2.0/main/frameq.c:377:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pattern, "%s/set%%02d", dirname);
data/qfits-6.2.0/main/frameq.c:380:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
            sscanf(pglob.gl_pathv[i], pattern, &num);
data/qfits-6.2.0/main/frameq.c:438:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(filename, "%s/%s_%02d", fi->tplid, fi->origfile, fi->nexp);
data/qfits-6.2.0/main/frameq.c:440:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(filename, "%s/%s_%02d/IN", fi->tplid,fi->origfile,fi->nexp);
data/qfits-6.2.0/saft/fitsmd5.c:420: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(value, fits_pretty_string(value));
data/qfits-6.2.0/saft/fitsmd5.c:463:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(card, "%s= '%s' / data MD5 signature", FITSMD5KEY, datamd5);
data/qfits-6.2.0/saft/fitsort.c:137:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(allrecords[nfiles-1].listkw[kwnum].value, word) ;
data/qfits-6.2.0/saft/fitsort.c:162:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(fmt, FMT_STRING, max_filnam) ;
data/qfits-6.2.0/saft/fitsort.c:163:25:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        if (printnames) printf(fmt, "FILE");
data/qfits-6.2.0/saft/fitsort.c:165:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf(fmt, FMT_STRING, max_width[i]) ;
data/qfits-6.2.0/saft/fitsort.c:166:13:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            printf(fmt, argv[i]) ;
data/qfits-6.2.0/saft/fitsort.c:178:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf(fmt, FMT_STRING, max_filnam) ;
data/qfits-6.2.0/saft/fitsort.c:179:13:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            printf(fmt, allrecords[i].filename) ;
data/qfits-6.2.0/saft/fitsort.c:182:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf(fmt, FMT_STRING, max_width[kwnum]);
data/qfits-6.2.0/saft/fitsort.c:184:17:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                printf(fmt, allrecords[i].listkw[kwnum].value) ;
data/qfits-6.2.0/saft/fitsort.c:185:18:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            else printf(fmt, " ");
data/qfits-6.2.0/saft/fitsort.c:226:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    sscanf(line, "%*s %*s %s", word) ;
data/qfits-6.2.0/saft/fitsort.c:253: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(kw, line) ;
data/qfits-6.2.0/saft/fitsort.c:296: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(ws, dotkey) ;
data/qfits-6.2.0/saft/fitsort.c:300:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(hierarchy, token) ;
data/qfits-6.2.0/saft/fitsort.c:354:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        sscanf(tmp, "%s", word) ;
data/qfits-6.2.0/saft/hierarch28.c:153: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(name_in, argv[1]) ;
data/qfits-6.2.0/saft/hierarch28.c:155:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(name_conv, argv[2]) ;
data/qfits-6.2.0/src/qfits_card.c:116:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(line, "%s ", key);
data/qfits-6.2.0/src/qfits_card.c:130:10:  [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).
    else strcpy(cval, val);
data/qfits-6.2.0/src/qfits_card.c:134:10:  [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).
    else strcpy(ccom, com);
data/qfits-6.2.0/src/qfits_card.c:144:23:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        if (hierarch) sprintf(safe_line, "%-29s= %s / %s", key, cval, ccom);
data/qfits-6.2.0/src/qfits_card.c:145:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        else sprintf(safe_line, "%-8.8s= %20s / %-48s", key, cval, ccom);
data/qfits-6.2.0/src/qfits_card.c:154:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(safe_line, "%-29s=                    / %s", key, ccom);
data/qfits-6.2.0/src/qfits_card.c:156:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(safe_line, "%-8.8s=                      / %-48s", key, ccom);
data/qfits-6.2.0/src/qfits_card.c:165: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(cval2, qfits_pretty_string(cval));
data/qfits-6.2.0/src/qfits_card.c:181:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(safe_line, "%-29s= '%s' / %s", key, cval_q, ccom);
data/qfits-6.2.0/src/qfits_card.c:185:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(safe_line, "%-8.8s= '%-8s' / %s", key, cval_q, ccom);
data/qfits-6.2.0/src/qfits_card.c:508: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(expanded, expkey_strupc(keyword));
data/qfits-6.2.0/src/qfits_card.c:513: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(ws, expkey_strupc(keyword));
data/qfits-6.2.0/src/qfits_card.c:517:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(expanded, token);
data/qfits-6.2.0/src/qfits_error.c:99:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(msg, fmt, ap) ;
data/qfits-6.2.0/src/qfits_error.c:102:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(all, "*** %s", msg);
data/qfits-6.2.0/src/qfits_error.c:117:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(msg, fmt, ap) ;
data/qfits-6.2.0/src/qfits_error.c:120:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(all, "error: %s", msg);
data/qfits-6.2.0/src/qfits_filename.c:116: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(path, filename);
data/qfits-6.2.0/src/qfits_filename.c:204: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(path, filename);
data/qfits-6.2.0/src/qfits_header.c:667:20:  [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).
    if (key!=NULL) strcpy(key, k->key);
data/qfits-6.2.0/src/qfits_header.c:669:27:  [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).
        if (k->val!=NULL) strcpy(val, k->val);
data/qfits-6.2.0/src/qfits_header.c:673:27:  [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).
        if (k->com!=NULL) strcpy(com, k->com);
data/qfits-6.2.0/src/qfits_header.c:677:27:  [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).
        if (k->lin!=NULL) strcpy(lin, k->lin);
data/qfits-6.2.0/src/qfits_memory.c:1059:12:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    return strcpy(t, s);
data/qfits-6.2.0/src/qfits_memory.c:1186:12:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    (void) strcpy(p, str);
data/qfits-6.2.0/src/qfits_memory.c:1481:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(qfits_mem_tmpfilename, "%s/vmswap_%05ld_%05x", 
data/qfits-6.2.0/src/qfits_table.c:187:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str_val2, "'%s'", qfits_build_format(curr_col)) ;
data/qfits-6.2.0/src/qfits_table.c:191:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str_val2, "%s", curr_col->tlabel) ;
data/qfits-6.2.0/src/qfits_table.c:195:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str_val2, "%s", curr_col->tunit) ;
data/qfits-6.2.0/src/qfits_table.c:215:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(str_val, "'%s'", date) ;
data/qfits-6.2.0/src/qfits_table.c:238:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(str_val, "'%s'", date) ;
data/qfits-6.2.0/src/qfits_table.c:246:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str_val2, "%s", curr_col->tlabel) ;
data/qfits-6.2.0/src/qfits_table.c:250:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str_val2, "'%s'", qfits_build_format(curr_col)) ;
data/qfits-6.2.0/src/qfits_table.c:260:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(str_val2, "%s", curr_col->tunit) ;
data/qfits-6.2.0/src/qfits_table.c:309: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).
    (void)strcpy(qt->filename, filename) ;
data/qfits-6.2.0/src/qfits_table.c:372: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).
    (void)strcpy(qc->tlabel, label) ;
data/qfits-6.2.0/src/qfits_table.c:375: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).
    (void)strcpy(qc->tunit, unit) ;
data/qfits-6.2.0/src/qfits_table.c:378: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).
    (void)strcpy(qc->nullval, nullval) ;
data/qfits-6.2.0/src/qfits_table.c:381: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).
    (void)strcpy(qc->tdisp, disp) ;
data/qfits-6.2.0/src/qfits_table.c:498:16:  [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).
        } else strcpy(label, qfits_pretty_string(str_val)) ;
data/qfits-6.2.0/src/qfits_table.c:504:16:  [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).
        } else strcpy(unit, qfits_pretty_string(str_val)) ;
data/qfits-6.2.0/src/qfits_table.c:510:16:  [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).
        } else strcpy(disp, qfits_pretty_string(str_val)) ;
data/qfits-6.2.0/src/qfits_table.c:516:16:  [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).
        } else strcpy(nullval, qfits_pretty_string(str_val)) ;
data/qfits-6.2.0/src/qfits_table.c:1517:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(md5card, "DATAMD5 = '%s' / MD5 checksum", md5hash);
data/qfits-6.2.0/src/qfits_table.c:1726: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(stmp, ctmp);
data/qfits-6.2.0/src/qfits_table.c:1838: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(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1849:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1854:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1859:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1863:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1876:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1881:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1886:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1890:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1903:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1908:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1913:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1917:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1929:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1934:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1939:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1943:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1955:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1960:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1965:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1969:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1978:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1982:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1990:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:1994:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:2002:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:2006:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(stmp, ctmp) ;
data/qfits-6.2.0/src/qfits_table.c:2041: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(l, s);
data/qfits-6.2.0/test/test_pixio.c:86:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stdout, fmt, ap);
data/qfits-6.2.0/test/test_pixio.c:97:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/qfits-6.2.0/test/test_pixio.c:189:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:215:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:241:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:375:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:418:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:461:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:504:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:548:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:556:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_pixio.c:564:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename,
data/qfits-6.2.0/test/test_qfits.c:83:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stdout, fmt, ap);
data/qfits-6.2.0/test/test_qfits.c:94:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/qfits-6.2.0/test/test_tfits.c:67:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stdout, fmt, ap);
data/qfits-6.2.0/test/test_tfits.c:78:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/qfits-6.2.0/test/test_tfits.c:325:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(filename, srcdir) ;
data/qfits-6.2.0/test/test_tfits.c:326:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(filename, BIN_TABLE_NAME) ;
data/qfits-6.2.0/test/test_tfits.c:334:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(filename, srcdir) ;
data/qfits-6.2.0/test/test_tfits.c:335:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(filename, ASCII_TABLE_NAME) ;
data/qfits-6.2.0/test/test_tfits.c:319:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    srcdir = strdup(getenv("srcdir")) ;
data/qfits-6.2.0/main/dfits.c:51:9:  [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).
#define fopen           gzopen
data/qfits-6.2.0/main/dfits.c:178:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(name, "r"))==NULL) {
data/qfits-6.2.0/main/dfits.c:193:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        buf[LGTH+2];
data/qfits-6.2.0/main/dfits.c:254:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                data_bytes *= (int)atoi(read_val) / 8 ;
data/qfits-6.2.0/main/dfits.c:267:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    naxis = (int)atoi(read_val);
data/qfits-6.2.0/main/dfits.c:271:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    data_bytes *= (int)atoi(read_val);
data/qfits-6.2.0/main/dfits.c:333:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                data_bytes *= (int)atoi(read_val) / 8 ;
data/qfits-6.2.0/main/dfits.c:346:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    naxis = (int)atoi(read_val);
data/qfits-6.2.0/main/dfits.c:350:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    data_bytes *= (int)atoi(read_val);
data/qfits-6.2.0/main/dfits.c:366:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        buf[1];
data/qfits-6.2.0/main/dtfits.c:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    name_i[512] ;
data/qfits-6.2.0/main/dtfits.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    name_o[512] ;
data/qfits-6.2.0/main/dtfits.c:102:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            ext = atoi(argv[i]) ;
data/qfits-6.2.0/main/dtfits.c:151:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((out = fopen(name_o, "w"))==NULL) {
data/qfits-6.2.0/main/dtfits.c:265: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                ctmp[512];
data/qfits-6.2.0/main/dtfits.c:341:25:  [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(ctmp, "%d, ", (int)ucol[k]) ;
data/qfits-6.2.0/main/dtfits.c:345:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp,"%d",(int)ucol[col->atom_nb-1]);
data/qfits-6.2.0/main/dtfits.c:354:25:  [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(ctmp, "%g, ", dcol[k]) ;
data/qfits-6.2.0/main/dtfits.c:358:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%g", dcol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:367:25:  [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(ctmp, "%f, ", fcol[k]) ;
data/qfits-6.2.0/main/dtfits.c:371:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%f", fcol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:379:25:  [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(ctmp, "%d, ", scol[k]) ;
data/qfits-6.2.0/main/dtfits.c:383:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%d", scol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:391:25:  [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(ctmp, "%d, ", icol[k]) ;
data/qfits-6.2.0/main/dtfits.c:395:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%d", icol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:403:25:  [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(ctmp, "%c, ", ccol[k]) ;
data/qfits-6.2.0/main/dtfits.c:407:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%c", ccol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:415:25:  [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(ctmp, "%d, ", ucol[k]) ;
data/qfits-6.2.0/main/dtfits.c:419:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%d", ucol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:427:25:  [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(ctmp, "%d, ", icol[k]) ;
data/qfits-6.2.0/main/dtfits.c:431:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%d", icol[col->atom_nb-1]) ;
data/qfits-6.2.0/main/dtfits.c:464: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                ctmp[512];
data/qfits-6.2.0/main/dtfits.c:522:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%d", icol[0]) ;
data/qfits-6.2.0/main/dtfits.c:529:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%f", fcol[0]) ;
data/qfits-6.2.0/main/dtfits.c:535:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                    sprintf(ctmp, "%g", dcol[0]) ;
data/qfits-6.2.0/main/flipx.c:102:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    lx = atoi(sval);
data/qfits-6.2.0/main/flipx.c:108:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    ly = atoi(sval);
data/qfits-6.2.0/main/flipx.c:114:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    bpp = atoi(sval);
data/qfits-6.2.0/main/flipx.c:126:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd=open(filename, O_RDWR))==-1) {
data/qfits-6.2.0/main/frameq.c:115:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (sval!=NULL) fi->expno = (int)atoi(sval);
data/qfits-6.2.0/main/frameq.c:118:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (sval!=NULL) fi->nexp = (int)atoi(sval);
data/qfits-6.2.0/main/frameq.c:267:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char     filename[512];
data/qfits-6.2.0/main/frameq.c:366: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    pattern[512];
data/qfits-6.2.0/main/frameq.c:398:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        filename[512];
data/qfits-6.2.0/main/frameq.c:441:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            list = fopen(filename, "w");
data/qfits-6.2.0/main/qextract.c:59:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    ext = (int)atoi(argv[2]) ;
data/qfits-6.2.0/main/qextract.c:185: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(th->filename, "ext%d.tfits", ext) ; 
data/qfits-6.2.0/main/qextract.c:228: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[1024] ;
data/qfits-6.2.0/main/qextract.c:231: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(outname, "ext%d.fits", ext) ;
data/qfits-6.2.0/main/qextract.c:252: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).
    if ((out = fopen(outname, "w")) == NULL) return -1 ;
data/qfits-6.2.0/main/replacekey.c:72: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            card_tmp[NM_SIZ] ;
data/qfits-6.2.0/saft/fitsmd5.c:49:9:  [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).
#define fopen           gzopen
data/qfits-6.2.0/saft/fitsmd5.c:62:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(filename, "r"))==NULL) {
data/qfits-6.2.0/saft/fitsmd5.c:102:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char in[64];
data/qfits-6.2.0/saft/fitsmd5.c:198:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
data/qfits-6.2.0/saft/fitsmd5.c:347:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char     pretty[FITSLINESZ+1] ;
data/qfits-6.2.0/saft/fitsmd5.c:383:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char value[FITSLINESZ+1] ;
data/qfits-6.2.0/saft/fitsmd5.c:430: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        card[FITSLINESZ];
data/qfits-6.2.0/saft/fitsmd5.c:442:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(filename, O_RDWR);
data/qfits-6.2.0/saft/fitsmd5.c:470:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf+off_md5, card, FITSLINESZ);
data/qfits-6.2.0/saft/fitsmd5.c:491:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            buf[FITSBLOCKSZ];
data/qfits-6.2.0/saft/fitsmd5.c:497:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char    digest[16] ;
data/qfits-6.2.0/saft/fitsmd5.c:498:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char        datamd5[MD5HASHSZ+1];
data/qfits-6.2.0/saft/fitsmd5.c:519:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(filename, "r"))==NULL) {
data/qfits-6.2.0/saft/fitsmd5.c:620: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(datamd5,
data/qfits-6.2.0/saft/fitsmd5.c:662:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char        digest[16] ;
data/qfits-6.2.0/saft/fitsmd5.c:678:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(filename, O_RDONLY))==-1) {
data/qfits-6.2.0/saft/fitsort.c:51: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    value[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:57:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            filename[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:76: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    curline[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:77: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    word[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:85:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    fmt[8] ;
data/qfits-6.2.0/saft/fitsort.c:248: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    kw[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:249:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    esokw[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:293: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    ws[MAX_STRING] ;
data/qfits-6.2.0/saft/fitsort.c:295: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(hierarchy, "HIERARCH ESO");
data/qfits-6.2.0/saft/fitsort.c:320:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    tmp[MAX_STRING] ;
data/qfits-6.2.0/saft/hierarch28.c:144:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            name_conv[NM_SIZ] ;
data/qfits-6.2.0/saft/hierarch28.c:145:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            name_in[NM_SIZ] ;
data/qfits-6.2.0/saft/hierarch28.c:157:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(name_conv, "table.conv") ;
data/qfits-6.2.0/saft/hierarch28.c:207:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        line[NM_SIZ] ;
data/qfits-6.2.0/saft/hierarch28.c:208: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        kw1[FITS_LINE],
data/qfits-6.2.0/saft/hierarch28.c:215:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((convtab = fopen(name_conv, "r")) == NULL) {
data/qfits-6.2.0/saft/hierarch28.c:293:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(name_in, O_RDWR) ;
data/qfits-6.2.0/saft/hierarch28.c:476:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        tmp[FITS_LINE+1];
data/qfits-6.2.0/saft/hierarch28.c:477: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        comment[FITS_LINE+1];
data/qfits-6.2.0/saft/hierarch28.c:500:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(tmp, " %-29.29s %-40.40s", 
data/qfits-6.2.0/saft/hierarch28.c:503: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(line+i, tmp, 71);
data/qfits-6.2.0/saft/hierarch28.c:511:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(tmp, " %-29.29s %-40.40s",
data/qfits-6.2.0/saft/hierarch28.c:514: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(line+i, tmp, 71);
data/qfits-6.2.0/saft/hierarch28.c:522:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(tmp, " %-29.29s %-40.40s",
data/qfits-6.2.0/saft/hierarch28.c:525: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(line+i, tmp, 71);
data/qfits-6.2.0/saft/hierarch28.c:533:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(tmp, " %-29.29s %-40.40s",
data/qfits-6.2.0/saft/hierarch28.c:536: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(line+i, tmp, 71);
data/qfits-6.2.0/saft/hierarch28.c:572:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((convtab = fopen("table.conv", "w")) == NULL) {
data/qfits-6.2.0/saft/hierarch28.c:600:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[13];
data/qfits-6.2.0/saft/hierarch28.c:610: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(buf, "'%c%02d:%02d:%06.3f'", (sign<0)? '-' : ' ', d, m, s);
data/qfits-6.2.0/saft/iofits.c:114:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    ptype = (int)atoi(argv[3]) ;
data/qfits-6.2.0/saft/iofits.c:161:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd_in = open(name_in, O_RDONLY)) == -1) {
data/qfits-6.2.0/saft/iofits.c:247:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd_out = open(name_out, O_RDWR)) == -1) {
data/qfits-6.2.0/saft/iofits.c:268:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf_out, buf_in, header_size) ;
data/qfits-6.2.0/saft/iofits.c:318:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        line[81] ;
data/qfits-6.2.0/saft/iofits.c:323: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).
    if ((in = fopen(name, "r")) == NULL) {
data/qfits-6.2.0/saft/iofits.c:401: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    replace[81] ;
data/qfits-6.2.0/saft/iofits.c:408: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(replace,
data/qfits-6.2.0/saft/iofits.c:411: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(where, replace, 80) ;
data/qfits-6.2.0/saft/iofits.c:429: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    lookfor[80] ;
data/qfits-6.2.0/saft/iofits.c:444: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(lookfor, "NAXIS%d", i) ;
data/qfits-6.2.0/saft/iofits.c:487: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                a2[2] ;
data/qfits-6.2.0/saft/iofits.c:488: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                a4[4] ;
data/qfits-6.2.0/saft/iofits.c:489: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                a8[8] ;
data/qfits-6.2.0/saft/iofits.c:504: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(bo, bi, npix * bpp) ; 
data/qfits-6.2.0/saft/iofits.c:556: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:564: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:581: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:589: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:653: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:661: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(a2, ip, 2) ;    
data/qfits-6.2.0/saft/iofits.c:667: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:686: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:694: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(a2, ip, 2) ;
data/qfits-6.2.0/saft/iofits.c:700: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:770: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:799: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:806: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:811: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:827: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:834: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:839: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:870: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:912: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:962: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:995: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:1001: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(a4, ip, 4) ;
data/qfits-6.2.0/saft/iofits.c:1005: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(op, &d, 8) ;
data/qfits-6.2.0/saft/iofits.c:1037: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(a8, ip, 8) ;
data/qfits-6.2.0/saft/iofits.c:1078: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(a8, ip, 8) ;
data/qfits-6.2.0/saft/iofits.c:1129: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(a8, ip, 8) ;
data/qfits-6.2.0/saft/iofits.c:1166: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(op, &f, 4) ;
data/qfits-6.2.0/saft/iofits.c:1172: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(a8, ip, 8) ;
data/qfits-6.2.0/saft/iofits.c:1176: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(op, &f, 4) ;
data/qfits-6.2.0/saft/stripfits.c:116:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd_in = open(name_in, O_RDONLY)) == -1) {
data/qfits-6.2.0/saft/stripfits.c:167:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd_out = open(name_out, O_RDWR);
data/qfits-6.2.0/saft/stripfits.c:188:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf_out, buf_in+header_size, fsize_out) ;
data/qfits-6.2.0/saft/stripfits.c:211:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        line[81] ;
data/qfits-6.2.0/saft/stripfits.c:216: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).
    if ((in = fopen(name, "r")) == NULL) {
data/qfits-6.2.0/saft/stripfits.c:311: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        lookfor[80] ;
data/qfits-6.2.0/saft/stripfits.c:326: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(lookfor, "NAXIS%d", i) ;
data/qfits-6.2.0/src/md5.c:131:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
data/qfits-6.2.0/src/md5.h:9:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char in[64];
data/qfits-6.2.0/src/md5.h:15:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Final(unsigned char digest[16], struct MD5Context *context);
data/qfits-6.2.0/src/qfits_cache.c:329:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        buf[FITS_BLOCK_SIZE] ;
data/qfits-6.2.0/src/qfits_cache.c:361:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(filename, "r"))==NULL) {
data/qfits-6.2.0/src/qfits_cache.c:434:36:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                data_bytes *= (int)atoi(read_val) / 8 ;
data/qfits-6.2.0/src/qfits_cache.c:447:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    naxis = (int)atoi(read_val);
data/qfits-6.2.0/src/qfits_cache.c:451:40:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    data_bytes *= (int)atoi(read_val);
data/qfits-6.2.0/src/qfits_cache.c:611:44:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                        data_bytes *= (int)atoi(read_val) / 8 ;
data/qfits-6.2.0/src/qfits_cache.c:624:42:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            naxis = (int)atoi(read_val);
data/qfits-6.2.0/src/qfits_cache.c:628:48:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                            data_bytes *= (int)atoi(read_val);
data/qfits-6.2.0/src/qfits_card.c:92: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    cval[81];
data/qfits-6.2.0/src/qfits_card.c:93: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    cval2[81];
data/qfits-6.2.0/src/qfits_card.c:94: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    cval_q[81];
data/qfits-6.2.0/src/qfits_card.c:95:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    ccom[81];
data/qfits-6.2.0/src/qfits_card.c:96:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    safe_line[512];
data/qfits-6.2.0/src/qfits_card.c:108: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(line, "END") ;
data/qfits-6.2.0/src/qfits_card.c:133:20:  [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.
    if (com==NULL) strcpy(ccom, "no comment");
data/qfits-6.2.0/src/qfits_card.c:207:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char     key[81];
data/qfits-6.2.0/src/qfits_card.c:219:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(key, "        ");
data/qfits-6.2.0/src/qfits_card.c:224:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(key, "HISTORY");
data/qfits-6.2.0/src/qfits_card.c:228:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(key, "COMMENT");
data/qfits-6.2.0/src/qfits_card.c:232:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(key, "END");
data/qfits-6.2.0/src/qfits_card.c:278:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char value[81] ;
data/qfits-6.2.0/src/qfits_card.c:410:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char comment[81];
data/qfits-6.2.0/src/qfits_card.c:500:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char expanded[81];
data/qfits-6.2.0/src/qfits_card.c:501: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        ws[81];
data/qfits-6.2.0/src/qfits_card.c:512: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(expanded, "HIERARCH ESO");
data/qfits-6.2.0/src/qfits_card.c:534:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char l[1024+1];
data/qfits-6.2.0/src/qfits_error.c:90:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char msg[QFITS_ERR_MSGSIZE] ;
data/qfits-6.2.0/src/qfits_error.c:91: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 all[QFITS_ERR_MSGSIZE] ;
data/qfits-6.2.0/src/qfits_error.c:108:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char msg[QFITS_ERR_MSGSIZE] ;
data/qfits-6.2.0/src/qfits_error.c:109: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 all[QFITS_ERR_MSGSIZE] ;
data/qfits-6.2.0/src/qfits_filename.c:112:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char path[MAXNAMESZ];
data/qfits-6.2.0/src/qfits_filename.c:199:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char path[MAXNAMESZ+1];
data/qfits-6.2.0/src/qfits_float.c:197: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(&f, fnan_pat, 4);
data/qfits-6.2.0/src/qfits_float.c:198: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(&d, dnan_pat, 8);
data/qfits-6.2.0/src/qfits_float.c:211: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(&f, finf_pat, 4);
data/qfits-6.2.0/src/qfits_float.c:212: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(&d, dinf_pat, 8);
data/qfits-6.2.0/src/qfits_float.c:225: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(&f, fminf_pat, 4);
data/qfits-6.2.0/src/qfits_float.c:226: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(&d, dminf_pat, 8);
data/qfits-6.2.0/src/qfits_header.c:830:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            line[81];
data/qfits-6.2.0/src/qfits_header.c:1022: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 blankline[81];
data/qfits-6.2.0/src/qfits_header.c:1030: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(line, k->lin, 80);
data/qfits-6.2.0/src/qfits_image.c:414:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((lfile=fopen(ql->filename, "r"))==NULL) {
data/qfits-6.2.0/src/qfits_image.c:653: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).
        f_out = fopen(qd->filename, "a");
data/qfits-6.2.0/src/qfits_image.c:752: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(op, buf, npix * sizeof(float));
data/qfits-6.2.0/src/qfits_image.c:771: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(op, &dpix, 8);
data/qfits-6.2.0/src/qfits_image.c:837: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(op, &spix, 2);
data/qfits-6.2.0/src/qfits_image.c:844: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(op, buf, npix * sizeof(int));
data/qfits-6.2.0/src/qfits_image.c:860: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(op, &fpix, 4) ;
data/qfits-6.2.0/src/qfits_image.c:872: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(op, &dpix, 8);
data/qfits-6.2.0/src/qfits_image.c:938: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(op, &spix, 2);
data/qfits-6.2.0/src/qfits_image.c:956: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(op, &lpix, 4);
data/qfits-6.2.0/src/qfits_image.c:968: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(op, &fpix, 4) ;
data/qfits-6.2.0/src/qfits_image.c:975: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(op, buf, npix * 8) ;
data/qfits-6.2.0/src/qfits_image.c:1040: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(&spix, p_source, 2);
data/qfits-6.2.0/src/qfits_image.c:1051: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(&lpix, p_source, 4);
data/qfits-6.2.0/src/qfits_image.c:1062: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(&lpix, p_source, 4);
data/qfits-6.2.0/src/qfits_image.c:1067: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(&fpix, &lpix, 4);
data/qfits-6.2.0/src/qfits_image.c:1140: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(&spix, p_source, 2);
data/qfits-6.2.0/src/qfits_image.c:1151: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(&lpix, p_source, 4);
data/qfits-6.2.0/src/qfits_image.c:1162: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(&lpix, p_source, 4);
data/qfits-6.2.0/src/qfits_image.c:1167: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(&fpix, &lpix, 4);
data/qfits-6.2.0/src/qfits_image.c:1241: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(&spix, p_source, 2);
data/qfits-6.2.0/src/qfits_image.c:1252: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(&lpix, p_source, 4);
data/qfits-6.2.0/src/qfits_image.c:1263: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(&lpix, p_source, 4);
data/qfits-6.2.0/src/qfits_image.c:1268: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(&fpix, &lpix, 4);
data/qfits-6.2.0/src/qfits_md5.c:83:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char         datamd5[MD5HASHSZ+1] ;
data/qfits-6.2.0/src/qfits_md5.c:85:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char         digest[16] ;
data/qfits-6.2.0/src/qfits_md5.c:87:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                 buf[FITS_BLOCK_SIZE];
data/qfits-6.2.0/src/qfits_md5.c:96:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(filename, "r"))==NULL) {
data/qfits-6.2.0/src/qfits_md5.c:177: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(datamd5,
data/qfits-6.2.0/src/qfits_memory.c:121:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char qfits_memory_tmpdirname[TMPDIRNAMESZ] = "." ;
data/qfits-6.2.0/src/qfits_memory.c:168:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *   qfits_memory_p_filename[QFITS_MEMORY_MAXPTRS] ;
data/qfits-6.2.0/src/qfits_memory.c:173:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char     qfits_memory_p_memtype[QFITS_MEMORY_MAXPTRS] ;
data/qfits-6.2.0/src/qfits_memory.c:181:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char     qfits_memory_p_mm_filename[QFITS_MEMORY_MAXPTRS][MAPFILENAMESZ];
data/qfits-6.2.0/src/qfits_memory.c:248: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        wbuf[MEMPAGESZ] ;
data/qfits-6.2.0/src/qfits_memory.c:311:18:  [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).
        swapfd = open(fname, O_RDWR | O_CREAT, 0666);
data/qfits-6.2.0/src/qfits_memory.c:504:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((fd=open(name, O_RDONLY))==-1) {
data/qfits-6.2.0/src/qfits_memory.c:614:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd=open(name, O_RDONLY))==-1) {
data/qfits-6.2.0/src/qfits_memory.c:1015: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(ptr2, ptr, small_sz) ;
data/qfits-6.2.0/src/qfits_memory.c:1479:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char qfits_mem_tmpfilename[TMPFILENAMESZ] ;
data/qfits-6.2.0/src/qfits_rw.c:117:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                line[81];
data/qfits-6.2.0/src/qfits_rw.c:130:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(filename, "r"))==NULL) {
data/qfits-6.2.0/src/qfits_rw.c:201:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                line[81];
data/qfits-6.2.0/src/qfits_rw.c:284:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            line[81];
data/qfits-6.2.0/src/qfits_rw.c:318: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(line, where, 80);
data/qfits-6.2.0/src/qfits_rw.c:387:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((out=fopen(filename, "a"))==NULL)
data/qfits-6.2.0/src/qfits_rw.c:413: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).
    if ((fp = fopen(filename, "r"))==NULL) {
data/qfits-6.2.0/src/qfits_table.c:148:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                str_val[FITS_LINESZ] ;
data/qfits-6.2.0/src/qfits_table.c:149:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                str_val2[FITS_LINESZ] ;
data/qfits-6.2.0/src/qfits_table.c:175: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(str_val, "%d", tab_width) ;
data/qfits-6.2.0/src/qfits_table.c:177: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(str_val, "%d", (int)(t->nr)) ;        
data/qfits-6.2.0/src/qfits_table.c:181: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(str_val, "%d", (int)(t->nc)) ;
data/qfits-6.2.0/src/qfits_table.c:186:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TFORM%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:190:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TTYPE%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:194:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TUNIT%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:199:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val, "TZERO%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:200:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val2, "%f", curr_col->zero) ;
data/qfits-6.2.0/src/qfits_table.c:205:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val, "TSCAL%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:206:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val2, "%f", curr_col->scale) ;
data/qfits-6.2.0/src/qfits_table.c:228: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(str_val, "%d", tab_width) ;
data/qfits-6.2.0/src/qfits_table.c:230: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(str_val, "%d", (int)(t->nr)) ;        
data/qfits-6.2.0/src/qfits_table.c:234: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(str_val, "%d", (int)(t->nc)) ;
data/qfits-6.2.0/src/qfits_table.c:245:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TTYPE%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:249:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TFORM%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:253:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TBCOL%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:254:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val2, "%d", col_pos) ;
data/qfits-6.2.0/src/qfits_table.c:259:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(str_val, "TUNIT%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:264:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val, "TZERO%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:265:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val2, "%f", curr_col->zero) ;
data/qfits-6.2.0/src/qfits_table.c:270:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val, "TSCAL%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:271:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(str_val2, "%f", curr_col->scale) ;
data/qfits-6.2.0/src/qfits_table.c:416: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                keyword[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.c:423: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                label[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.c:424: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                unit[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.c:425: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                disp[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.c:426:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                nullval[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.c:465:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    nb_col = atoi(str_val) ;
data/qfits-6.2.0/src/qfits_table.c:472:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    table_width = atoi(str_val) ;
data/qfits-6.2.0/src/qfits_table.c:479:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    nb_raws = atoi(str_val) ;
data/qfits-6.2.0/src/qfits_table.c:495: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(keyword, "TTYPE%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:501: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(keyword, "TUNIT%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:507: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(keyword, "TDISP%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:513: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(keyword, "TNULL%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:519: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(keyword, "TFORM%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:583: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(keyword, "TZERO%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:593: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(keyword, "TSCAL%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:611:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(keyword, "TBCOL%d", i+1) ;
data/qfits-6.2.0/src/qfits_table.c:617:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                col_pos = atoi(qfits_pretty_string(str_val)) ;
data/qfits-6.2.0/src/qfits_table.c:619:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(keyword, "TBCOL%d", i+2) ;
data/qfits-6.2.0/src/qfits_table.c:625:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                next_col_pos = atoi(qfits_pretty_string(str_val)) ;
data/qfits-6.2.0/src/qfits_table.c:750: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(r, inbuf, field_size);
data/qfits-6.2.0/src/qfits_table.c:760: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(r, inbuf, field_size);
data/qfits-6.2.0/src/qfits_table.c:856: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(r, inbuf, field_size);
data/qfits-6.2.0/src/qfits_table.c:959: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:966:45:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                ((int*)out_array)[i] = (int)atoi(field) ; 
data/qfits-6.2.0/src/qfits_table.c:980: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1002: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1052:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval) == (int)((unsigned char*)out_array)[i])) {
data/qfits-6.2.0/src/qfits_table.c:1062:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==(int)((short*)out_array)[i])) {     
data/qfits-6.2.0/src/qfits_table.c:1072:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==((int*)out_array)[i])) {     
data/qfits-6.2.0/src/qfits_table.c:1158: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1165:45:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                ((int*)out_array)[i] = (int)atoi(field) ; 
data/qfits-6.2.0/src/qfits_table.c:1180: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1203: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1258:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)== (int)((unsigned char*)out_array)[i])) {
data/qfits-6.2.0/src/qfits_table.c:1269:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==(int)((short*)out_array)[i])) {     
data/qfits-6.2.0/src/qfits_table.c:1280:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==((int*)out_array)[i])) {     
data/qfits-6.2.0/src/qfits_table.c:1356: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(field, &in_array[i*col->atom_nb], col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1418:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==(int)((unsigned char*)tmp_array)[i])) {
data/qfits-6.2.0/src/qfits_table.c:1432:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==(int)((short*)tmp_array)[i])) {     
data/qfits-6.2.0/src/qfits_table.c:1446:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                (atoi(col->nullval)==((int*)tmp_array)[i])) {     
data/qfits-6.2.0/src/qfits_table.c:1477: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            md5card[81];
data/qfits-6.2.0/src/qfits_table.c:1480:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((outfile = fopen(table->filename, "w")) == NULL) {
data/qfits-6.2.0/src/qfits_table.c:1690: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                    ctmp[512];
data/qfits-6.2.0/src/qfits_table.c:1733:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1736:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp, "%d", icol[0]);
data/qfits-6.2.0/src/qfits_table.c:1745:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1748:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp, "%f", fcol[0]);
data/qfits-6.2.0/src/qfits_table.c:1756:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1759:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp, "%g", dcol[0]) ;
data/qfits-6.2.0/src/qfits_table.c:1798: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                    ctmp[512];
data/qfits-6.2.0/src/qfits_table.c:1847:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%f, ", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1852:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1858:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%d, ", (int)uccol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1862:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp,"%d",(int)uccol[col->atom_nb-1]);
data/qfits-6.2.0/src/qfits_table.c:1874:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%g, ", (double)((double)col->zero +
data/qfits-6.2.0/src/qfits_table.c:1879:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%g", (double)((double)col->zero +
data/qfits-6.2.0/src/qfits_table.c:1885:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%g, ", dcol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1889:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%g", dcol[col->atom_nb-1]) ;
data/qfits-6.2.0/src/qfits_table.c:1901:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%f, ", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1906:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1912:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%f, ", fcol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1916:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%f", fcol[col->atom_nb-1]) ;
data/qfits-6.2.0/src/qfits_table.c:1927:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%f, ", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1932:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1938:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%d, ", (int)scol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1942:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%d",(int)scol[col->atom_nb-1]);
data/qfits-6.2.0/src/qfits_table.c:1953:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%f, ", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1958:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%f", (float)(col->zero +
data/qfits-6.2.0/src/qfits_table.c:1964:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(ctmp, "%d, ", (int)icol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1968:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%d",(int)icol[col->atom_nb-1]);
data/qfits-6.2.0/src/qfits_table.c:1977:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%c, ", ccol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1981: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(ctmp, "%c", ccol[col->atom_nb-1]) ;
data/qfits-6.2.0/src/qfits_table.c:1989:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%d, ", uccol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:1993: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(ctmp, "%d", uccol[col->atom_nb-1]) ;
data/qfits-6.2.0/src/qfits_table.c:2001:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(ctmp, "%d, ", (int)icol[i]) ;
data/qfits-6.2.0/src/qfits_table.c:2005: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(ctmp, "%d",(int)icol[col->atom_nb-1]);
data/qfits-6.2.0/src/qfits_table.c:2033:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char l[1024+1];
data/qfits-6.2.0/src/qfits_table.c:2156:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char sval[10] ;
data/qfits-6.2.0/src/qfits_table.c:2161:16:  [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.
            nb=sprintf(sval, "A%d.%d", col->atom_nb, col->atom_dec_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2163:16:  [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.
            nb=sprintf(sval, "D%d.%d", col->atom_nb, col->atom_dec_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2165:16:  [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.
            nb=sprintf(sval, "E%d.%d", col->atom_nb, col->atom_dec_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2167:16:  [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.
            nb=sprintf(sval, "I%d.%d", col->atom_nb, col->atom_dec_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2169:16:  [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.
            nb=sprintf(sval, "F%d.%d", col->atom_nb, col->atom_dec_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2170:35:  [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.
        case TFITS_BIN_TYPE_D: nb=sprintf(sval, "%dD", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2171:35:  [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.
        case TFITS_BIN_TYPE_E: nb=sprintf(sval, "%dE", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2172:35:  [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.
        case TFITS_BIN_TYPE_I: nb=sprintf(sval, "%dI", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2173:35:  [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.
        case TFITS_BIN_TYPE_A: nb=sprintf(sval, "%dA", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2174:35:  [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.
        case TFITS_BIN_TYPE_B: nb=sprintf(sval, "%dB", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2175:35:  [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.
        case TFITS_BIN_TYPE_C: nb=sprintf(sval, "%dC", 
data/qfits-6.2.0/src/qfits_table.c:2177:35:  [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.
        case TFITS_BIN_TYPE_J: nb=sprintf(sval, "%dJ", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2178:35:  [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.
        case TFITS_BIN_TYPE_L: nb=sprintf(sval, "%dL", col->atom_nb) ; break ;
data/qfits-6.2.0/src/qfits_table.c:2179:35:  [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.
        case TFITS_BIN_TYPE_M: nb=sprintf(sval, "%dM", 
data/qfits-6.2.0/src/qfits_table.c:2181:35:  [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.
        case TFITS_BIN_TYPE_P: nb=sprintf(sval, "%dP", 
data/qfits-6.2.0/src/qfits_table.c:2183:35:  [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.
        case TFITS_BIN_TYPE_X: nb=sprintf(sval, "%dX", 
data/qfits-6.2.0/src/qfits_table.c:2293: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                field[1024] ;
data/qfits-6.2.0/src/qfits_table.c:2313: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.
        r = (unsigned char *)array[i] ;
data/qfits-6.2.0/src/qfits_table.c:2314:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        inbuf = (unsigned char *)(data[i]) ;
data/qfits-6.2.0/src/qfits_table.c:2328:25:  [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(field, "%g", ((double*)data[i])[j]) ;
data/qfits-6.2.0/src/qfits_table.c:2334:25:  [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(field, "%f", ((float*)data[i])[j]) ;
data/qfits-6.2.0/src/qfits_table.c:2339:25:  [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(field, "%d", ((int*)data[i])[j]) ;
data/qfits-6.2.0/src/qfits_table.c:2345: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(r, field, curr_col->atom_nb) ;
data/qfits-6.2.0/src/qfits_table.c:2351: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(r, inbuf, field_size) ;
data/qfits-6.2.0/src/qfits_table.c:2376: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(line, r, field_size) ;
data/qfits-6.2.0/src/qfits_table.h:141:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        tlabel[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.h:144: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        tunit[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.h:147: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        nullval[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.h:150: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        tdisp[FITSVALSZ] ;
data/qfits-6.2.0/src/qfits_table.h:207:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            filename[512] ;
data/qfits-6.2.0/src/qfits_time.c:117:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char date_iso8601[20] ;
data/qfits-6.2.0/src/qfits_time.c:124: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(date_iso8601, "%04d-%02d-%02dT%02d:%02d:%02d",
data/qfits-6.2.0/src/qfits_tools.c:263:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    naxes = atoi(sval) ;
data/qfits-6.2.0/src/qfits_tools.c:276:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        nplanes = atoi(sval);
data/qfits-6.2.0/src/qfits_tools.c:303:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char     pretty_buf[PRETTY_STRING_STATICBUFS][81] ;
data/qfits-6.2.0/src/qfits_tools.c:515:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(filename, O_RDWR) ;
data/qfits-6.2.0/src/qfits_tools.c:531: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(buf2, buf, hs) ;
data/qfits-6.2.0/src/qfits_tools.c:605:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(filename, O_RDWR) ;
data/qfits-6.2.0/src/qfits_tools.c:623: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(buf2, buf, hs) ;
data/qfits-6.2.0/src/qfits_tools.c:642: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(where, substitute, strlen(substitute));
data/qfits-6.2.0/test/test_pixio.c:67:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char md5sigs[FITS_NBITPIX][33] =
data/qfits-6.2.0/test/test_pixio.c:108:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                s_out[8];
data/qfits-6.2.0/test/test_pixio.c:112: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(s_out, "%d", TEST_LX);
data/qfits-6.2.0/test/test_pixio.c:114: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(s_out, "%d", TEST_LY);
data/qfits-6.2.0/test/test_pixio.c:116: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(s_out, "%d", qd->out_ptype);
data/qfits-6.2.0/test/test_pixio.c:119:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(qd->filename, "w");
data/qfits-6.2.0/test/test_pixio.c:160:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            filename[1024] ;
data/qfits-6.2.0/test/test_pixio.c:356:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    filename[1024];
data/qfits-6.2.0/test/test_pixio.c:541:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char filename[1024];
data/qfits-6.2.0/test/test_qfits.c:230:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(filename, "w");
data/qfits-6.2.0/test/test_qfits.c:407: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 key[80], val[80], com[80] ;
data/qfits-6.2.0/test/test_qfits.c:499:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(filename, "w");
data/qfits-6.2.0/test/test_qfits.c:523:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(filename, "a");
data/qfits-6.2.0/test/test_qfits.c:563:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(filename, "a");
data/qfits-6.2.0/test/test_qfits.c:603:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(filename, "a");
data/qfits-6.2.0/test/test_tfits.c:312:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char        filename[512] ;
data/qfits-6.2.0/main/dfits.c:161:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(s);
data/qfits-6.2.0/main/dfits.c:219:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!strncmp(buf, MAGIC, strlen(MAGIC))) {
data/qfits-6.2.0/main/dfits.c:221: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).
        } else if (!strncmp(buf, MAGICEXT, strlen(MAGICEXT))) {
data/qfits-6.2.0/main/dfits.c:232: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).
    if (strncmp(buf, MAGIC, strlen(MAGIC))) {
data/qfits-6.2.0/main/dtfits.c:272: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).
        col_sizes[i] = (int)strlen(col->tlabel) ;
data/qfits-6.2.0/main/dtfits.c:332:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(ctmp, ccol, col->atom_size * col->atom_nb) ;
data/qfits-6.2.0/main/dtfits.c:471: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).
        col_sizes[i] = (int)strlen(col->tlabel) ;
data/qfits-6.2.0/main/dtfits.c:515:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(ctmp, ccol, col->atom_nb) ;
data/qfits-6.2.0/saft/fitsmd5.c:360:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (i==(int)strlen(s)) break ;
data/qfits-6.2.0/saft/fitsmd5.c:363: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).
    if (i>=(int)(strlen(s)-1)) return pretty ;
data/qfits-6.2.0/saft/fitsmd5.c:365:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    while (i<(int)strlen(s)) {
data/qfits-6.2.0/saft/fitsmd5.c:374:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    j = (int)strlen(pretty)-1;
data/qfits-6.2.0/saft/fitsmd5.c:413:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(value, line+from, to-from+1);
data/qfits-6.2.0/saft/fitsmd5.c:529: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).
    md5keysz = (int)strlen(FITSMD5KEY) ;
data/qfits-6.2.0/saft/fitsort.c:143: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).
    for (i=0 ; i<argc-1 ; i++) max_width[i] = (int)strlen(argv[i]) ;
data/qfits-6.2.0/saft/fitsort.c:148: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).
        len = (int)strlen(allrecords[i].filename) ;
data/qfits-6.2.0/saft/fitsort.c:152: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).
                len = (int)strlen(allrecords[i].listkw[kwnum].value) ;
data/qfits-6.2.0/saft/fitsort.c:256:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    i = (int)strlen(kw) -1 ;
data/qfits-6.2.0/saft/fitsort.c:299:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(hierarchy, " ") ;
data/qfits-6.2.0/saft/fitsort.c:350: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).
        length = (int)strlen(begin) - (int)strlen(end) ;
data/qfits-6.2.0/saft/fitsort.c:350: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).
        length = (int)strlen(begin) - (int)strlen(end) ;
data/qfits-6.2.0/saft/fitsort.c:351:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(word, begin, length) ;
data/qfits-6.2.0/saft/hierarch28.c:250:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen(kw2)>strlen(kw1)) {
data/qfits-6.2.0/saft/hierarch28.c:250: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).
            if (strlen(kw2)>strlen(kw1)) {
data/qfits-6.2.0/saft/hierarch28.c:345:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = (int)strlen(s) -1 ;
data/qfits-6.2.0/saft/hierarch28.c:348:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(s, s+beg, len-beg+1) ;
data/qfits-6.2.0/saft/hierarch28.c:402: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).
    for (i=0 ; i<nk ; i++) keysizes[i] = (int)strlen(key_in[i]);
data/qfits-6.2.0/saft/hierarch28.c:473:18:  [1] (buffer) equal:
  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.
    char    *    equal ;
data/qfits-6.2.0/saft/hierarch28.c:481: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).
    for (i=0 ; i<(int)strlen(key_o) ; i++) {
data/qfits-6.2.0/saft/hierarch28.c:484:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(key_o)<=8) {
data/qfits-6.2.0/saft/hierarch28.c:499:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(comment, p, line+FITS_LINE-p);
data/qfits-6.2.0/saft/hierarch28.c:510:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(comment, p, line+FITS_LINE-p);
data/qfits-6.2.0/saft/hierarch28.c:521:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(comment, p, line+FITS_LINE-p);
data/qfits-6.2.0/saft/hierarch28.c:532:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(comment, p, line+FITS_LINE-p);
data/qfits-6.2.0/saft/hierarch28.c:541:29:  [1] (buffer) equal:
  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.
                line[i+j] = equal[j+1];
data/qfits-6.2.0/saft/hierarch28.c:551:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        for (i=(int)strlen(key_o) ; i<(int)strlen(key_i) ; i++) {
data/qfits-6.2.0/saft/hierarch28.c:551: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).
        for (i=(int)strlen(key_o) ; i<(int)strlen(key_i) ; i++) {
data/qfits-6.2.0/src/qfits_card.c:120:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(val);
data/qfits-6.2.0/src/qfits_card.c:123:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(line+8, val, len);
data/qfits-6.2.0/src/qfits_card.c:129:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else if (strlen(val)<1) cval[0]=(char)0;
data/qfits-6.2.0/src/qfits_card.c:146:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(line, safe_line, 80);
data/qfits-6.2.0/src/qfits_card.c:158:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(line, safe_line, 80);
data/qfits-6.2.0/src/qfits_card.c:182:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(key) + strlen(cval_q) + 3 >= 80)
data/qfits-6.2.0/src/qfits_card.c:182: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).
        if (strlen(key) + strlen(cval_q) + 3 >= 80)
data/qfits-6.2.0/src/qfits_card.c:187:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line, safe_line, 80);
data/qfits-6.2.0/src/qfits_card.c:258:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(key, line, i) ;
data/qfits-6.2.0/src/qfits_card.c:313:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(value, line+from, to-from+1);
data/qfits-6.2.0/src/qfits_card.c:336:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(value, line+from, to-from+1);
data/qfits-6.2.0/src/qfits_card.c:390:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(value, line+from, to-from+1);
data/qfits-6.2.0/src/qfits_card.c:472:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(comment, line+from, to-from+1);
data/qfits-6.2.0/src/qfits_card.c:516:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(expanded, " ");
data/qfits-6.2.0/src/qfits_filename.c:115:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(filename)>MAXNAMESZ) return NULL ;
data/qfits-6.2.0/src/qfits_filename.c:135:9:  [1] (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 character.
        strcpy(path, ".");
data/qfits-6.2.0/src/qfits_filename.c:202:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(filename)>MAXNAMESZ) return NULL ;
data/qfits-6.2.0/src/qfits_header.c:436:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(val)>0) k->val = qfits_strdup(val);
data/qfits-6.2.0/src/qfits_header.c:439:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(com)>0) k->com = qfits_strdup(com);
data/qfits-6.2.0/src/qfits_header.c:804:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(c)<1) return errval ;
data/qfits-6.2.0/src/qfits_header.c:894:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(val)>0) k->val = qfits_strdup(val);
data/qfits-6.2.0/src/qfits_header.c:899:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(com)>0) k->com = qfits_strdup(com) ;
data/qfits-6.2.0/src/qfits_header.c:904:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(lin)>0) k->lin = qfits_strdup(lin);
data/qfits-6.2.0/src/qfits_header.c:960:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else if ((int)strlen(key)<9)                    kt = keytype_primary ;
data/qfits-6.2.0/src/qfits_memory.c:1058: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).
    t = qfits_memory_malloc(1+strlen(s), filename, lineno);
data/qfits-6.2.0/src/qfits_memory.c:1183:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((p = malloc(strlen(str)+1)) == NULL)
data/qfits-6.2.0/src/qfits_memory.c:1209:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(key);
data/qfits-6.2.0/src/qfits_memory.c:1369:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(qfits_memory_p_mm_filename[pos], mm_filename,MAPFILENAMESZ);
data/qfits-6.2.0/src/qfits_rw.c:173:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(key)!=3) {
data/qfits-6.2.0/src/qfits_rw.c:220:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(line, (char*)hdr_str + ind, 80) ;
data/qfits-6.2.0/src/qfits_rw.c:254:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(key)!=3) {
data/qfits-6.2.0/src/qfits_rw.c:338:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen(key)==3)
data/qfits-6.2.0/src/qfits_rw.c:518: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).
    for (i=0 ; i<(int)strlen(s) ; i++) {
data/qfits-6.2.0/src/qfits_table.c:1724:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ctmp, ccol, col->atom_nb);
data/qfits-6.2.0/src/qfits_table.c:1836:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ctmp, ccol, col->atom_size * col->atom_nb) ;
data/qfits-6.2.0/src/qfits_table.c:2042:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    last = l + strlen(l);
data/qfits-6.2.0/src/qfits_table.c:2322:25:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                        strncpy(field, (char*)inbuf, curr_col->atom_nb) ;
data/qfits-6.2.0/src/qfits_tools.c:173:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = (int)strlen(exp_key);
data/qfits-6.2.0/src/qfits_tools.c:325:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (i==(int)strlen(s)) break ;
data/qfits-6.2.0/src/qfits_tools.c:328: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).
    if (i>=(int)(strlen(s)-1)) return pretty ;
data/qfits-6.2.0/src/qfits_tools.c:330:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    while (i<(int)strlen(s)) {
data/qfits-6.2.0/src/qfits_tools.c:341:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    j = (int)strlen(pretty)-1;
data/qfits-6.2.0/src/qfits_tools.c:361:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((int)strlen(s)>1) return 0 ;
data/qfits-6.2.0/src/qfits_tools.c:549:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(card, where, 80) ;
data/qfits-6.2.0/src/qfits_tools.c:642: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).
    memcpy(where, substitute, strlen(substitute));

ANALYSIS SUMMARY:

Hits = 623
Lines analyzed = 19228 in approximately 0.66 seconds (29189 lines/second)
Physical Source Lines of Code (SLOC) = 11631
Hits@level = [0] 424 [1]  82 [2] 396 [3]   1 [4] 144 [5]   0
Hits@level+ = [0+] 1047 [1+] 623 [2+] 541 [3+] 145 [4+] 144 [5+]   0
Hits/KSLOC@level+ = [0+] 90.0181 [1+] 53.5638 [2+] 46.5136 [3+] 12.4667 [4+] 12.3807 [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.