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/simtools-0~git20171013+dfsg/config11/config11.c Examining data/simtools-0~git20171013+dfsg/converters/asc/asc.c Examining data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c Examining data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c Examining data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c Examining data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c Examining data/simtools-0~git20171013+dfsg/converters/hpconvert/hpconvert.c Examining data/simtools-0~git20171013+dfsg/converters/indent/indent.c Examining data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c Examining data/simtools-0~git20171013+dfsg/converters/m8376/m8376.c Examining data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c Examining data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c Examining data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c Examining data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c Examining data/simtools-0~git20171013+dfsg/converters/noff/noff.c Examining data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c Examining data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c Examining data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c Examining data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c Examining data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c Examining data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble_aux.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble_aux.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble_globals.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble_globals.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/extree.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/extree.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rad50.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rad50.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/tools/varrec.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.h Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c Examining data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c Examining data/simtools-0~git20171013+dfsg/extracters/cpytap/cpytap.c Examining data/simtools-0~git20171013+dfsg/extracters/cpytap/defs.h Examining data/simtools-0~git20171013+dfsg/extracters/cpytap/tap.h Examining data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.c Examining data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.h Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/dbtap.c Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/defs.h Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.h Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/tap.h Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.c Examining data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.h Examining data/simtools-0~git20171013+dfsg/extracters/mmdir/mmdir.c Examining data/simtools-0~git20171013+dfsg/extracters/mtdump/mtdump.c Examining data/simtools-0~git20171013+dfsg/extracters/rawtap/defs.h Examining data/simtools-0~git20171013+dfsg/extracters/rawtap/rawtap.c Examining data/simtools-0~git20171013+dfsg/extracters/rawtap/tap.h Examining data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.c Examining data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/absio.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/borabsio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/djabsio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doalloc.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doalloc.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/docomp.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/docomp.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodelete.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodelete.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodir.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodir.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodump.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodump.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doident.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doident.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dolist.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dolist.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doprot.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doprot.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dorename.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dorename.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dorts.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dorts.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosabsio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosabsio.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosrxio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dotype.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/dotype.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/fileio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/fileio.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/filename.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/filename.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/fldef.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/flx.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/linuxabsio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/platform.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/rstsflx.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/rstsflx.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/silfmt.h Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/unxabsio.c Examining data/simtools-0~git20171013+dfsg/extracters/rstsflx/version.h Examining data/simtools-0~git20171013+dfsg/extracters/sdsdump/sdsdump.c FINAL RESULTS: data/simtools-0~git20171013+dfsg/config11/config11.c:65:6: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. if (gets (inp) == NULL) return 0; data/simtools-0~git20171013+dfsg/config11/config11.c:78:2: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets (inp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:607:59: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. maccp = macstr->vtbl->gets(macstr); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.c:404:38: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. while ((line = stack->top->vtbl->gets(stack->top)) == NULL) { data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.h:47:6: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. *gets) ( data/simtools-0~git20171013+dfsg/converters/asc/asc.c:73:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:418: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(card, csy); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:455: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(card, end); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:536:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "deck_%s", card); data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c:44:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c:44:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:64:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/indent/indent.c:47:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:46:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:48:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:45:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:47:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:45:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/noff/noff.c:44:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:99:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:46:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:46:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:63:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (tapname, argv[0]); data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:46:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:48:2: [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 (oname, argv[i]); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1099:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( filename, &pathname[jx + 1] ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1157: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(mip->mac_line, line); /* save line */ data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1172:2: [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(list_title, line); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1847:2: [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(line, curmacro->mac_line); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2350: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( temp, s_page ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2351:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( temp, "%s %d", s_page, list_pageno ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2527: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( sym->name, name ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2742:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(body+length, line); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2774:2: [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(sym->name, args[i]); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:340:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tMODNAME %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:343:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tCSECT %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:346:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tISD %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:349:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tXFER %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:353:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tGLOBAL %s=%o %s%s%s %s flags=%o\n", name, value, data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:361:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tPSECT %s=%o %s%s %s %s %s %s %s flags=%o\n", name, value, data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:375:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tIDENT %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:378:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tVSECT %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:381:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gsdline, "\tCompletion Routine Name %s=%o flags=%o\n", name, value, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:66:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(binline, "%*s%*d", (int)SIZEOF_MEMBER(LSTFORMAT, flag), "", (int)SIZEOF_MEMBER(LSTFORMAT, line_number), data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:100:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(binline, "%*s %6.6o", (int)offsetof(LSTFORMAT, pc), "", addr); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:103:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(binline, "%*s%*d %6.6o", (int)SIZEOF_MEMBER(LSTFORMAT, flag), "", data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:118:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(binline, "%*s%*d %6.6o", (int)SIZEOF_MEMBER(LSTFORMAT, flag), "", data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:175: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/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:181:9: [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(lstfile, fmt, ap); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:105: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(temp, envname); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:107: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(temp, env); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:108: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(temp, PATHSEP); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:109: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(temp, value); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.c:55:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s:%d->%s", refstr->name, refstr->line, mac->sym.label); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:479:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s.%s", mlb->directory[i].label, suffix); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:302:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s.MAC", mlb->directory[i].label); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c:102:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s:%d->.REPT", stack->top->name, stack->top->line); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c:229:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s:%d->.IRP", stack->top->name, stack->top->line); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c:357:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s:%d->.IRPC", stack->top->name, stack->top->line); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:240: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(concat, cp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:243: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(concat, name); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:872:3: [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( objectpathname, rim_mode ? ".rim" : ".bin" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:897:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( filename, &pathname[jx + 1] ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1646:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( list_title, line ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2004:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( listfile, fmt, mark, symtab[cx].name, symtab[cx].val ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2150:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( temp, s_page ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2151:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( temp, "%s %d", s_page, list_pageno ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2311:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( symtab[ix].name, name ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1016:3: [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( objectpathname, rim_mode ? ".rim" : ".bin" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1041:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( filename, &pathname[jx + 1] ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2502:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( list_title, line ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2929:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( listfile, fmt, mark, symtab[cx].name, symtab[cx].val ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3076:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( temp, s_page ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3077:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( temp, "%s %d", s_page, list_pageno ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3242:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( symtab[ix].name, name ); data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.c:120:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(name, F_OK) == 0) data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:216:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%2d-%s-%4d", doyr, month[i], year); data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.c:113:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(name, F_OK) == 0) data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.c:113:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(name, F_OK) == 0) data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.c:98:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (n, name); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:777:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (curfile, "%s%s", curdir, name); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:64:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (dirname, "%s/%03d%03d", on, cproj, cprog); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:82:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (tmpname, "%s/%s", dirname, rname); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:83:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. } else sprintf (tmpname, "%s/%s", on, rname); data/simtools-0~git20171013+dfsg/extracters/rstsflx/filename.c:256:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (tname, iname); /* copy the name */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.c:32:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "%2ld-%3s-%04ld", day, months[mon], yr); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:200:4: [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 (defdevice, argv[0]); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:201:4: [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 (defsize, argv[1]); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:207:4: [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 (defdevice, argv[0]); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:466:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (histfile, home); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:570:4: [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 (sw + 1, name); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:337:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "cd")) != -1) { data/simtools-0~git20171013+dfsg/converters/hpconvert/hpconvert.c:250:16: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). name_out = tmpnam (NULL); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:93:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *env = getenv(envname); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:222:11: [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. env = getenv(envname); data/simtools-0~git20171013+dfsg/extracters/cpytap/cpytap.c:288:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "r:A:I:R:S:")) != -1) { data/simtools-0~git20171013+dfsg/extracters/dbtap/dbtap.c:124:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "lcaer:A:EP:S")) != -1) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.c:133:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((rname = getenv ("RSTSDISK")) == NULL) data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.c:137:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((rssize = getenv ("RSTSDISKSIZE")) == NULL) data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:456:7: [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. hf = getenv ("FLXHISTFILE"); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:457:17: [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. histfilesize = getenv ("FLXHISTFILESIZE"); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:458:13: [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. histsize = getenv ("FLXHISTSIZE"); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:463:10: [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. home = getenv ("HOME"); data/simtools-0~git20171013+dfsg/config11/config11.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *cp, *ocp, inp[100]; data/simtools-0~git20171013+dfsg/config11/config11.c:38:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char numctl[RANK_LNT]; data/simtools-0~git20171013+dfsg/config11/config11.c:39:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char modtab[RANK_LNT] = { data/simtools-0~git20171013+dfsg/config11/config11.c:51:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *namtab[RANK_LNT] = { data/simtools-0~git20171013+dfsg/converters/asc/asc.c:49:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/asc/asc.c:74:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/asc/asc.c:75:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/asc/asc.c:76:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/asc/asc.c:80:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:65:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char card[CARDLEN + 1], pad[RECLEN]; data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:83:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *compr[MAXSPACES+1] = { data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:360: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 ((cosy = fopen(argv[0], compress ? "w" : "r")) == NULL) { data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:410: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 ((src = fopen(filename, "r")) == NULL) { data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:520:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[32], *eofn; data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:527: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(filename, "%05u.deck", seqno); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:543: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). if ((dest = fopen(filename, "w")) == 0) { data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c:35:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c:45:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".dtp"); data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c:46:14: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".dtp"); data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c:47:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "r"); data/simtools-0~git20171013+dfsg/converters/decsys/decsys.c:51:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c:36:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c:45:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".dt8"); data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c:46:22: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".dt8"); data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c:47:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/dtos8cvt/dtos8cvt.c:51:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:32:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char fzero[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buc[4]; data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:55:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:56:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:65:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:66:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".tap"); data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:67:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:71:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/hpconvert/hpconvert.c:173:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sig_fwd [SIGNATURE_SIZE], sig_rev [SIGNATURE_SIZE]; data/simtools-0~git20171013+dfsg/converters/hpconvert/hpconvert.c:174:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hold, cylinder [CYLINDER_SIZE]; data/simtools-0~git20171013+dfsg/converters/hpconvert/hpconvert.c:192: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). fin = fopen (name_in, "rb"); data/simtools-0~git20171013+dfsg/converters/hpconvert/hpconvert.c:260:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fout = fopen (name_out, "wb"); data/simtools-0~git20171013+dfsg/converters/indent/indent.c:39:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, iline[256], oline[256], oname[256]; data/simtools-0~git20171013+dfsg/converters/indent/indent.c:48:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/indent/indent.c:49:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/indent/indent.c:50:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "ra"); data/simtools-0~git20171013+dfsg/converters/indent/indent.c:54:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wa"); data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:37:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:38:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:47:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:48:22: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:49:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/littcvt/littcvt.c:53:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/m8376/m8376.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[256]; data/simtools-0~git20171013+dfsg/converters/m8376/m8376.c:42:2: [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 (fname, "C:\\temp\\m8376\\m8376e%03d.bin", fnum[i]); data/simtools-0~git20171013+dfsg/converters/m8376/m8376.c:43:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fi[i] = fopen (fname, "rb"); data/simtools-0~git20171013+dfsg/converters/m8376/m8376.c:63:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outf = fopen ("c:\\prom.bin", "wb"); data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:35:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bc[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:38:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:49:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".tpc"); data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:50:22: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".tpc"); data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:51:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/mt2tpc/mt2tpc.c:55:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:35:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bc[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:46:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:47:22: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".tap"); data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:48:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/mtcvt23/mtcvtv23.c:52:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bc[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:37:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bceof[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:38:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:39:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:48:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:49:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:50:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/mtcvtfix/mtcvtfix.c:54:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:35:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bc[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:46:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:47:22: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:48:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/mtcvtodd/mtcvtodd.c:52:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/noff/noff.c:36:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oline[256], oname[256]; data/simtools-0~git20171013+dfsg/converters/noff/noff.c:45:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/noff/noff.c:46:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/noff/noff.c:47:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "ra"); data/simtools-0~git20171013+dfsg/converters/noff/noff.c:51:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wa"); data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:39:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char data[MAXR][MAXA]; data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:40:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *ppos, *cptr, line[256], oname[256]; data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:64:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "r"); data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:100:46: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".bin"); data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:101:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".bin"); data/simtools-0~git20171013+dfsg/converters/sfmtcvt/sfmtcvt.c:102: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). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, *fpos, *tpos, oname[256], line[256]; data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:47:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:48:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:49:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "r"); data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:53:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "w"); data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:35:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, *fpos, *tpos, *rmv, *ins, oname[256], line[256]; data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:47:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".new"); data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:48:18: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".new"); data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:49:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "r"); data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:53:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "w"); data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:48:9: [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 (atoi (argv[2]) <= 0) { data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:52:25: [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). blocksize = (size_t)atoi (argv[2]); data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:59:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (NULL == (fIn = fopen (argv[0], "rb"))) { data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:64:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (tapname, ".tap"); data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:65:25: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (NULL == (fOut = fopen (tapname, "wb"))) { data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:35:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[BLKSIZ]; data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tef[4] = { 0, 0, 0, 0 }; data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:37:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char twc[4] = { 0, 2, 0, 0 }; data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:38:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:47:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:48:14: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".tap"); data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:49:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/tp512cvt/tp512cvt.c:53:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:35:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bc[4] = { 0 }; data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FLPSIZ]; data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:38:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ppos, oname[256]; data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:49:42: [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 (ppos = strrchr (oname, '.')) strcpy (ppos, ".tap"); data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:50:22: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. else strcat (oname, ".tap"); data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:51:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/tpc2mt/tpc2mt.c:55:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ofile = fopen (oname, "wb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:247:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:565:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:566:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char listpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:567:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sympathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:568:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char objectpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:570:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char permpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:583:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char body[1]; /* malloc'ed accordingly */ data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:587:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_line[LINELEN]; /* Saved macro invocation line. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:598:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char list_title[LINELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:600:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINELEN]; /* Input line. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:656:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ascii_to_fiodec[128] = { data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:676:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fiodec_to_ascii[64] = { data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:755:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). objectfile = fopen( objectpathname, "wb" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:758: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). listfile = fopen( listpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:873:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[4]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:888: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). f = fopen(fname, "rb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1078:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( objectpathname, ".rim"); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1082:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( listpathname, ".lst" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1086:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( permpathname, ".prm" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1090:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( sympathname, ".sym" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1226:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1370:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) { data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1834:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char inpline[LINELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1882: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(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) { data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2260:21: [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(( permfile = fopen( permpathname, "w" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2347:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[10]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2404:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2552:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2654:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char termin[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2655:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char args[MAC_MAX_ARGS][SYMLEN]; /* macro & arg names */ data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2656:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char body[MAC_MAX_LENGTH + 1]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2958:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2968:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linecol[12]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2975: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( linecol, ":%d:%d", lineno, col + 1 ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2988:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linecol[12]; data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2993: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( linecol, ":%d:%d", lineno, col + 1 ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:3026:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). objectfile = fopen( sympathname, "wb" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:289:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char endc[6]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:304:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ident, cp, len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:464:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hitfile[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:492:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char quote[4]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:533:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hitfile[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:560:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char macfile[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:561:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hitfile[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble_aux.c:695:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[16]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:53:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *psects[NPSECTS]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:321:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[8]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:384: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(gsdline, "\t***Unknown GSD entry type %d flags=%o\n", cp[i + 5] & 0xff, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:473:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[8]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:693:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(argv[1], "rb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:697: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). bin = fopen(argv[2], "wb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:60: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(listline, cp, len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:135: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(binline + strlen(binline), " %3.3o%1.1s ", value & 0377, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:137: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(binline + strlen(binline), "%6.6o%1.1s ", value & 0177777, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.h:15:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flag[2]; /* Error flags */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.h:16:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_number[6]; /* Line number */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.h:17:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pc[8]; /* Location */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.h:18:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char words[8][3]; /* three instruction words */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.h:19:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char source[1]; /* source line */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:177:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *fnames[32]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:276:31: [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). lstfile = fopen(lstname, "w"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.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). obj = fopen(objname, "wb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.c:384:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[10]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.c:529:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[32]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.c:532: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(temp, "%d$", locsym++); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:194: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). mlb->fp = fopen(name, "rb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:261: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(ent1, ent2, entsize); /* Move used entry data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:282:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char radname[16]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:341: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 module_header[022]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:474:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[32]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:480:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(name, "w"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:102: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). mlb->fp = fopen(name, "rb"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:157: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(ent1, ent2, entsize); /* Move used entry data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:178:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char radname[16]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:299:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[32]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:303:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(name, "w"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.c:1007:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char endmod[2] = { data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.h:126:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[122]; /* space for 15 GSD entries */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.h:172:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char text[128]; /* text buffer */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.h:175:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rld[128]; /* RLD buffer */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/object.h:260:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char accum[126]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:74: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(str, cp + start, len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.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 endstr[4]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:119: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(str, cp, len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:543: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(symcp, cp, len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:555: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(newsym, "%ld$%d", strtol(symcp, NULL, 10), lsb); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:597:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char endstr[6]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:610: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(endstr, "<>\n"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.c:131: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->buffer + buf->length, str, len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.c:345:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "r"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.c:59: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 temp[8]; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.c:192:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SYMMAX_MAX + 1]; // big size data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:215:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:542:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errorpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:543:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:544:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char listpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:545:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char objectpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:547:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char permpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:549:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_buffer[MAC_MAX_LENGTH + 1]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:550:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *mac_bodies[MAC_TABLE_LENGTH]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:551:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_arg_name[MAC_MAX_ARGS][SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:556:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char list_title[4*LINELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:558:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[4*LINELEN]; /* Input line. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:560:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_line[4*LINELEN]; /* Saved macro invocation line. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:635: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). errorfile = fopen( errorpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:678: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). errorfile = fopen( errorpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:679: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). objectfile = fopen( objectpathname, "wb" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:682: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). listfile = fopen( listpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:876:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( listpathname, ".lst" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:880:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( errorpathname, ".err" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:884:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( permpathname, ".prm" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:914:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:946: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). if(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1517:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char inpline[4*LINELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1575:21: [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(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2028:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(( permfile = fopen( permpathname, "w" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2147:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[10]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2214:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2387:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2449:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:3007:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:3022:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linecol[12]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:3029: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( linecol, "(%d:%d)", lineno, col + 1 ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:3047:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linecol[12]; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:3052: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( linecol, "(%d:%d)", lineno, col + 1 ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:287:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:679:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errorpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:680:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:681:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char listpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:682:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char objectpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:684:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char permpathname[NAMELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:686:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_buffer[MAC_MAX_LENGTH + 1]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:687:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *mac_bodies[MAC_TABLE_LENGTH]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:688:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_arg_name[MAC_MAX_ARGS][SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:693:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char list_title[4*LINELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:695:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[4*LINELEN]; /* Input line. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:697:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac_line[4*LINELEN]; /* Saved macro invocation line. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:777: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). errorfile = fopen( errorpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:821: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). errorfile = fopen( errorpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:822: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). objectfile = fopen( objectpathname, "wb" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:825: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). listfile = fopen( listpathname, "w" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1020:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( listpathname, ".lst" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1024:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( errorpathname, ".err" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1028:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat( permpathname, ".prm" ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1058:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1096: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). if(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2357:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char inpline[4*LINELEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2415:21: [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(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2953:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(( permfile = fopen( permpathname, "w" )) == NULL ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3072:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[10]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3140:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3318:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3380:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:4175:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[SYMLEN]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:4190:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linecol[12]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:4197: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( linecol, "(%d:%d)", lineno, col + 1 ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:4215:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linecol[12]; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:4220: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( linecol, "(%d:%d)", lineno, col + 1 ); data/simtools-0~git20171013+dfsg/extracters/cpytap/cpytap.c:136:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char record[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/cpytap/cpytap.c:185:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char record[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/cpytap/cpytap.c:187: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 ((file = fopen(filename, "r")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.c:35:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.c:74: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 ((tfile = fopen(name, "r")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.c:123: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 ((tfile = fopen(name, "w+")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/cpytap/tapeio.c:185: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 ((tfile =fopen(name, "r+")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char record[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:51:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *month[12] = { data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:217:10: [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. } else strcpy(buf, "xx-yyy-xxxx"); data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:361: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 ((file = fopen(name, "r")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:362:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16], extension[8], exten[8]; data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:507:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[32]; data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:521:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&filename[offset], "_%o_%o", hdr->prog, hdr->proj); data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:535:25: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((file = fopen(filename, "w")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:616:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[14], sdate[12]; data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.c:72: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 ((tfile = fopen(name, "r")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.c:116: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 ((tfile = fopen(name, "w+")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/dbtap/tapeio.c:173: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 ((tfile =fopen(name, "r+")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/mmdir/mmdir.c:36:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char b[53]; data/simtools-0~git20171013+dfsg/extracters/mmdir/mmdir.c:37:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bca[4]; data/simtools-0~git20171013+dfsg/extracters/mmdir/mmdir.c:48:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/extracters/mtdump/mtdump.c:47:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 bca[4] = { 0,0,0,0 }; data/simtools-0~git20171013+dfsg/extracters/mtdump/mtdump.c:77:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/extracters/rawtap/rawtap.c:41:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char record[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/rawtap/rawtap.c:117:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, filename[16]; data/simtools-0~git20171013+dfsg/extracters/rawtap/rawtap.c:175:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((file = fopen(argv[0], "r")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/rawtap/rawtap.c:254:19: [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(filename, "%05u.dat", seqno++); data/simtools-0~git20171013+dfsg/extracters/rawtap/rawtap.c:255:31: [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 ((file = fopen(filename, "w")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.c:37:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAXRCLNT]; data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.c:72: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 ((tfile = fopen(name, "r")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.c:116: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 ((tfile = fopen(name, "w+")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/rawtap/tapeio.c:173: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 ((tfile =fopen(name, "r+")) != NULL) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.c:173:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((rstsfile = fopen (rname, mode)) == NULL) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:69:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char curdir[10]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:70:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char curfile[22]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:86:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[LSIZE]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:459:4: [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 (curdir, "[*,*]"); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:464:4: [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 (curdir, "[%d,*]", proj); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:470:3: [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 (curdir, "[%d,%d]", proj, prog); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:662:4: [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 (curdir, "[*,*]"); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:663:8: [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. else sprintf (curdir, "[%d,*]", lb->lppn[1]); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:668:3: [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 (curdir, "[%d,%d]", lb->lppn[1], lb->lppn[0]); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:770:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[11]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:1585:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (badbmap, sattbf2, sattsize); /* load the bad block map */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:1780:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (sattbufp, sattbf2, sattsize); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dodump.c:29:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char r50[4]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpname[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:48:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dirname[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rname[NAMELEN]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:54: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 (rname, "%03d%03d.dir", f->cproj, f->cprog); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:121:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). of = fopen (on2, openmode); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:180: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 ((of = fopen (on, openmode)) == NULL) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.c:227:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (argc < 3) memcpy (&bf, &hf, sizeof (firqb)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.c:297:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (bbuf, bh, n); /* copy that into boot buffer */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.c:298:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (bbuf + n, getdata (&bf, dskio), dskioe - dskio); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doident.c:14:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rdate[DATELEN]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doident.c:15:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rtime[RTIMELEN]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[20]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:128: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 ((mf = fopen (sw.merge, "rb")) == NULL) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:172:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((rstsfile = fopen (rname, DCREATEMODE)) == NULL) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:281:2: [2] (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.cname, f.name, NAMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:296:2: [2] (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.cname, f.name, NAMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:308:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (f.cname, f.name, NAMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:362:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fibuf, dummyboot, sizeof (dummyboot)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doinit.c:363:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fibuf + sizeof (dummyboot), dummytext, sizeof (dummytext)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dolist.c:27:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rts[RTSLEN]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/dolist.c:28:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char stat[4]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/dolist.c:29:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char credate[DATELEN], acdate[DATELEN], cretime[RTIMELEN]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/dolist.c:95:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy (rts, " ", RTSLEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.c:162: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 ((inf = fopen (inspec, mode)) == NULL) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.c:175:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmpf, &outf, sizeof (firqb)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.c:206:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmpf, &outf, sizeof (firqb)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.c:207:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmpf.name, outf.cname, NAMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doput.c:225:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmpf.name, outf.cname, NAMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dorename.c:29:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&tmpf, &newf, sizeof (firqb)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dorename.c:30:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmpf.name, newf.cname, NAMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosrxio.c:167:50: [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). jg dorw_giveup ;error if change with any files open data/simtools-0~git20171013+dfsg/extracters/rstsflx/filename.c:224:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tname[FILENAME_MAX]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/filename.c:233:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (inf.name, "xxxxxx.xxx", NAMELEN); /* use xxx if bad name */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.c:308:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pname[7]; /* pack ID in ascii */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.c:549:3: [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 (f->cname, "%03d%03d.dir", f->cproj, f->cprog); data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.c:811:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (u, newl, sizeof (ufdlabel)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.c:1089:4: [2] (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, rms2, sizeof (ufdrms2)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/fip.c:1103:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (a1, rms1, sizeof(ufdrms1)); data/simtools-0~git20171013+dfsg/extracters/rstsflx/flx.h:175:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[NAMELEN]; /* supplied file name.ext */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/flx.h:179:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cname[NAMELEN]; /* current name.ext */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/flx.h:207:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char pname[7]; /* pack ID in ascii */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/linuxabsio.c:108:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (rname, O_RDONLY); data/simtools-0~git20171013+dfsg/extracters/rstsflx/linuxabsio.c:166:11: [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). floppy = open (rname, flags); data/simtools-0~git20171013+dfsg/extracters/rstsflx/linuxabsio.c:207:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (b, trackbuf + (BLKSIZE * tsec), BLKSIZE); data/simtools-0~git20171013+dfsg/extracters/rstsflx/linuxabsio.c:226:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (trackbuf + (BLKSIZE * tsec), b, BLKSIZE); data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.c:11:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char months[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.c:21:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, " none ", DATELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.c:43:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, " none ", RTIMELEN); data/simtools-0~git20171013+dfsg/extracters/rstsflx/rtime.c:54:2: [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, "%2d:%02d %1cm", hour, min, m); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:65:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[200]; data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:196:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. defdevice = (char *) malloc (strlen (argv[0]) + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:197:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. defsize = (char *) malloc (strlen (argv[1]) + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:205:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. defdevice = (char *) malloc (strlen (argv[0]) + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:467:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (histfile, "/.flx_history"); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:470: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). if (histfilesize != NULL) hfilesize = atoi (histfilesize); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:471: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). if (histsize != NULL) hsize = atoi (histsize); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:535:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. while ((name = (char *) commands[list_index].kw)) data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:551:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sw[20]; data/simtools-0~git20171013+dfsg/extracters/sdsdump/sdsdump.c:62:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifile = fopen (argv[i], "rb"); data/simtools-0~git20171013+dfsg/converters/asc/asc.c:87:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). k = getc (ifile); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:130:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, spcount = 0, len = strlen(card); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:138: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). size_t l = strlen(compr[spcount]); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:150: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). size_t l = strlen(compr[spcount]); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:196:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ch = fgetc(src)) != -1) { data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:201:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ch = fgetc(src)) == -1) data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:423: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). if (strlen(filename) <= 11) { data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:424:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 5; i < strlen(filename); i++) data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:428:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(card, &filename[5], strlen(filename) - 5); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:428:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncpy(card, &filename[5], strlen(filename) - 5); data/simtools-0~git20171013+dfsg/converters/cosy/cosy.c:443: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). int len = strlen(card); data/simtools-0~git20171013+dfsg/converters/gt7cvt/gt7cvt.c:78:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc (ifile); data/simtools-0~git20171013+dfsg/converters/m8376/m8376.c:53:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (fi[j]); data/simtools-0~git20171013+dfsg/converters/noff/noff.c:57:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (ffc = 0; (c = fgetc (ifile)) != EOF; ) { data/simtools-0~git20171013+dfsg/converters/strrem/strrem.c:44:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen (srem); data/simtools-0~git20171013+dfsg/converters/strsub/strsub.c:43:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rmvlen = strlen (rmv); data/simtools-0~git20171013+dfsg/converters/tar2mt/tar2mt.c:58:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tapname = realloc (tapname, 5 + strlen (argv[0])); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:838:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(f); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1045: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). len = strlen( pathname ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1076:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( objectpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1080:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( listpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1084:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( permpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1088:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( sympathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:1849:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). maxcc = strlen( line ); /* Restore maxcc. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2419: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( name ) < 1 ) data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2725:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int ll = strlen(line); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2756:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(mdp->body, body, length); data/simtools-0~git20171013+dfsg/crossassemblers/macro1/macro1.c:2767:5: [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(sym->name, "R"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:427:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). add_sym(label, strlen(string), SYMBOLFLAG_DEFINITION | islocal, &absolute_section, data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:594:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(macfile, label, sizeof(macfile)); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:595:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(macfile, ".MAC", sizeof(macfile) - strlen(macfile) - 1); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:595:76: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(macfile, ".MAC", sizeof(macfile) - strlen(macfile) - 1); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/assemble.c:1165:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). radstr = memcheck(malloc(strlen(cp))); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:70:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (c = fgetc(fp), c != EOF && c == 0) ; data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:82:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:91:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:102:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:137:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:149:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:288: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 (cp = buf + strlen(buf); cp > buf; cp--) data/simtools-0~git20171013+dfsg/crossassemblers/macro11/dumpobj.c:388:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsdline = realloc(gsdline, strlen(gsdline) + 1); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:96: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(binline) >= col1) { data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:102:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(binline) <= col2) { data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:135: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). sprintf(binline + strlen(binline), " %3.3o%1.1s ", value & 0377, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/listing.c:137: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). sprintf(binline + strlen(binline), "%6.6o%1.1s ", value & 0177777, flags); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:99: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). temp = memcheck(malloc(strlen(envname) + data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:101: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). strlen(env) + data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:103: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). strlen(value) + data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macro11.c:106:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(temp, "="); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/macros.c:53:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *name = memcheck(malloc(strlen(refstr->name) + 32)); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:172:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *cp = buf + strlen(buf); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:408:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); /* Get low byte of length */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:410:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); /* Get high byte */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:423:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); /* Get macro byte */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:434:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); /* Get pad byte; need not be 0. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb-rsx.c:442:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); /* Get macro byte */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:81:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *cp = buf + strlen(buf); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:203:25: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/mlb.c:267:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(mlb->fp); /* Get macro byte */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/parse.c:605: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(endstr + 1, "\n"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c:100:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *name = memcheck(malloc(strlen(stack->top->name) + 32)); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c:227:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *name = memcheck(malloc(strlen(stack->top->name) + 32)); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/rept_irpc.c:355:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *name = memcheck(malloc(strlen(stack->top->name) + 32)); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.c:147: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). buffer_appendn(buf, str, strlen(str)); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/stream2.c:291:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (c = fgetc(fstr->fp), c != '\n' && c != '\f' && c != EOF) { data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.c:196:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(label, labelraw, SYMMAX_MAX); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.c:200:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(label, labelraw, symbol_len); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/symbols.c:517: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). int len = strlen(sym->label); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/tools/varrec.c:18:7: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getchar(); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/tools/varrec.c:20:7: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getchar(); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/tools/varrec.c:26:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getchar(); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/tools/varrec.c:31:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getchar(); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:218:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hitfile, name, hitlen); /* Copy to target */ data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:234:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *concat = malloc(strlen(cp) + strlen(name) + 2); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:234:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *concat = malloc(strlen(cp) + strlen(name) + 2); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:241: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). if (concat[strlen(concat) - 1] != '/') data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:242:13: [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(concat, "/"); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:247:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hitfile, concat, hitlen - 1); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:305:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int needspace = to - strlen(str); data/simtools-0~git20171013+dfsg/crossassemblers/macro11/util.c:307:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str += strlen(str); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:839: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). len = strlen( pathname ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:870:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( objectpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:874:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( listpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:878:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( errorpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:882:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( permpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1531: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). maxcc = strlen( line ); /* Restore maxcc. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1647:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( list_title[strlen(list_title) - 1] == '\n' ) data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1649: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). list_title[strlen(list_title) - 1] = '\0'; data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:1651: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). if( strlen( list_title ) > TITLELEN ) data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2234:7: [1] (buffer) strlen: Does not handle 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( name ) < 1 ) data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2686:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( mac_bodies[value], mac_buffer, length ); data/simtools-0~git20171013+dfsg/crossassemblers/macro7/macro7.c:2866: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). if( strlen( list_title ) > TITLELEN ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:983: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). len = strlen( pathname ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1014:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( objectpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1018:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( listpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1022:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( errorpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:1026:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( permpathname, pathname, jx ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2371: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). maxcc = strlen( line ); /* Restore maxcc. */ data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2503:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( list_title[strlen(list_title) - 1] == '\n' ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2505: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). list_title[strlen(list_title) - 1] = '\0'; data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:2507: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). if( strlen( list_title ) > TITLELEN ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3161:7: [1] (buffer) strlen: Does not handle 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( name ) < 1 ) data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:3636:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( mac_bodies[value], mac_buffer, length ); data/simtools-0~git20171013+dfsg/crossassemblers/macro8x/macro8x.c:4008: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). if( strlen( list_title ) > TITLELEN ) data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:385:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else len = strlen(fname); data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:394: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). len = strlen(&ext[1]); data/simtools-0~git20171013+dfsg/extracters/dbtap/dos11.c:522:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(filename); data/simtools-0~git20171013+dfsg/extracters/rstsflx/borabsio.c:19:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (rname[strlen(rname) - 1] == ':') { /* device name alone */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/diskio.c:97: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 ((n = (char *) malloc (strlen (name) + 1)) == NULL) rabort(NOMEM); data/simtools-0~git20171013+dfsg/extracters/rstsflx/djabsio.c:271:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (rname[strlen(rname) - 1] == ':') { /* device name alone */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/doclean.c:97:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmdlen = strlen (answer); data/simtools-0~git20171013+dfsg/extracters/rstsflx/doget.c:163:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = strlen (on); data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.c:41:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). word16 read; /* 52 do a single transfer */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/dohook.c:182:7: [1] (buffer) strlen: Does not handle 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 (disk) != 2 ) { data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosabsio.c:302:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (rname[strlen(rname) - 1] == ':') { /* device name alone */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosrxio.c:67:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ;Common routine for read, write and verify. data/simtools-0~git20171013+dfsg/extracters/rstsflx/dosrxio.c:133:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ;Analyze read/write errors and either make another attempt or data/simtools-0~git20171013+dfsg/extracters/rstsflx/fileio.c:504: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). llen = strlen (iptr); /* get length of this line */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/filename.c:264:8: [1] (buffer) strlen: Does not handle 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 (in1) < 4) ppn = 0; data/simtools-0~git20171013+dfsg/extracters/rstsflx/linuxabsio.c:88:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (floppy, trackbuf, sizeof (trackbuf)) != data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:196:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). defdevice = (char *) malloc (strlen (argv[0]) + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:197: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). defsize = (char *) malloc (strlen (argv[1]) + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:205: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). defdevice = (char *) malloc (strlen (argv[0]) + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:336:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen (argv[n]) - 1; data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:341:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (s->kw) == l) data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:386:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen (cmdname); /* get length of command */ data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:391:8: [1] (buffer) strlen: Does not handle 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->kw) == l) data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:424:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). t = s + strlen (s) - 1; data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:464:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i = strlen (home); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:465:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). histfile = malloc (i + strlen ("/.flx_history") + 1); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:531: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). len = strlen (text); data/simtools-0~git20171013+dfsg/extracters/rstsflx/scancmd.c:560: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). len = strlen (text) - 1; ANALYSIS SUMMARY: Hits = 623 Lines analyzed = 38664 in approximately 1.10 seconds (35082 lines/second) Physical Source Lines of Code (SLOC) = 26837 Hits@level = [0] 1034 [1] 132 [2] 388 [3] 12 [4] 86 [5] 5 Hits@level+ = [0+] 1657 [1+] 623 [2+] 491 [3+] 103 [4+] 91 [5+] 5 Hits/KSLOC@level+ = [0+] 61.7431 [1+] 23.2142 [2+] 18.2956 [3+] 3.83798 [4+] 3.39084 [5+] 0.18631 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.