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/xc3sprog-0+svn795+dfsg/atxmega128a1_nvm_regs.h
Examining data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp
Examining data/xc3sprog-0+svn795+dfsg/avrfusefile.h
Examining data/xc3sprog-0+svn795+dfsg/avrfuseparse.cpp
Examining data/xc3sprog-0+svn795+dfsg/bitfile.cpp
Examining data/xc3sprog-0+svn795+dfsg/bitfile.h
Examining data/xc3sprog-0+svn795+dfsg/bitparse.cpp
Examining data/xc3sprog-0+svn795+dfsg/bitrev.cpp
Examining data/xc3sprog-0+svn795+dfsg/bitrev.h
Examining data/xc3sprog-0+svn795+dfsg/cabledb.cpp
Examining data/xc3sprog-0+svn795+dfsg/cabledb.h
Examining data/xc3sprog-0+svn795+dfsg/debug.cpp
Examining data/xc3sprog-0+svn795+dfsg/debug.h
Examining data/xc3sprog-0+svn795+dfsg/detectchain.cpp
Examining data/xc3sprog-0+svn795+dfsg/devicedb.cpp
Examining data/xc3sprog-0+svn795+dfsg/devicedb.h
Examining data/xc3sprog-0+svn795+dfsg/devices.in.h
Examining data/xc3sprog-0+svn795+dfsg/fallback/xguff/spi_defs.h
Examining data/xc3sprog-0+svn795+dfsg/fallback/xguff/usrp_commands.h
Examining data/xc3sprog-0+svn795+dfsg/fallback/xguff/usrp_interfaces.h
Examining data/xc3sprog-0+svn795+dfsg/io_exception.h
Examining data/xc3sprog-0+svn795+dfsg/iobase.cpp
Examining data/xc3sprog-0+svn795+dfsg/iobase.h
Examining data/xc3sprog-0+svn795+dfsg/iodebug.cpp
Examining data/xc3sprog-0+svn795+dfsg/iodebug.h
Examining data/xc3sprog-0+svn795+dfsg/ioftdi.cpp
Examining data/xc3sprog-0+svn795+dfsg/ioftdi.h
Examining data/xc3sprog-0+svn795+dfsg/iofx2.cpp
Examining data/xc3sprog-0+svn795+dfsg/iofx2.h
Examining data/xc3sprog-0+svn795+dfsg/ioparport.cpp
Examining data/xc3sprog-0+svn795+dfsg/ioparport.h
Examining data/xc3sprog-0+svn795+dfsg/ioxpc.cpp
Examining data/xc3sprog-0+svn795+dfsg/ioxpc.h
Examining data/xc3sprog-0+svn795+dfsg/javr.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr.h
Examining data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.h
Examining data/xc3sprog-0+svn795+dfsg/javr/compiler.h
Examining data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/fuse.h
Examining data/xc3sprog-0+svn795+dfsg/javr/javr.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/javr.h
Examining data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/jtag_javr.h
Examining data/xc3sprog-0+svn795+dfsg/javr/menu.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/menu.h
Examining data/xc3sprog-0+svn795+dfsg/javr/parse.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/parse.h
Examining data/xc3sprog-0+svn795+dfsg/javr/srecdec.cpp
Examining data/xc3sprog-0+svn795+dfsg/javr/srecdec.h
Examining data/xc3sprog-0+svn795+dfsg/jedecfile.cpp
Examining data/xc3sprog-0+svn795+dfsg/jedecfile.h
Examining data/xc3sprog-0+svn795+dfsg/jedecparse.cpp
Examining data/xc3sprog-0+svn795+dfsg/jtag.cpp
Examining data/xc3sprog-0+svn795+dfsg/jtag.h
Examining data/xc3sprog-0+svn795+dfsg/libusb0/usb.h
Examining data/xc3sprog-0+svn795+dfsg/libusb_dyn.c
Examining data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp
Examining data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.h
Examining data/xc3sprog-0+svn795+dfsg/par_nt.h
Examining data/xc3sprog-0+svn795+dfsg/pdibase.h
Examining data/xc3sprog-0+svn795+dfsg/pdioverjtag.cpp
Examining data/xc3sprog-0+svn795+dfsg/pdioverjtag.h
Examining data/xc3sprog-0+svn795+dfsg/progalg.h
Examining data/xc3sprog-0+svn795+dfsg/progalgavr.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgavr.h
Examining data/xc3sprog-0+svn795+dfsg/progalgnvm.h
Examining data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgspiflash.h
Examining data/xc3sprog-0+svn795+dfsg/progalgxc2c.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgxc2c.h
Examining data/xc3sprog-0+svn795+dfsg/progalgxc3s.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgxc3s.h
Examining data/xc3sprog-0+svn795+dfsg/progalgxc95x.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgxc95x.h
Examining data/xc3sprog-0+svn795+dfsg/progalgxcf.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgxcf.h
Examining data/xc3sprog-0+svn795+dfsg/progalgxcfp.cpp
Examining data/xc3sprog-0+svn795+dfsg/progalgxcfp.h
Examining data/xc3sprog-0+svn795+dfsg/readdna.cpp
Examining data/xc3sprog-0+svn795+dfsg/srecfile.cpp
Examining data/xc3sprog-0+svn795+dfsg/srecfile.h
Examining data/xc3sprog-0+svn795+dfsg/srecparse.cpp
Examining data/xc3sprog-0+svn795+dfsg/utilities.cpp
Examining data/xc3sprog-0+svn795+dfsg/utilities.h
Examining data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp
Examining data/xc3sprog-0+svn795+dfsg/xmega_pdi_nvm.cpp
Examining data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp

FINAL RESULTS:

data/xc3sprog-0+svn795+dfsg/cabledb.cpp:73:15:  [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(cable.alias,alias);
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:76:15:  [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(cable.optstring,options);
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:108:17:  [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(cable.alias,alias);
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:111:17:  [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(cable.optstring,options);
data/xc3sprog-0+svn795+dfsg/devicedb.cpp:126:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  if (sscanf(linebuf, "%08x %d %x %s", &idcode, &irlen, &id_cmd, textbuf) != 4)
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:756:3:  [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(fp,";%s Fuse Bit definitions" EOLINE,gDeviceData.name);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:757:3:  [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(fp,";0 => Programmed, 1 => Not Programmed" EOLINE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:768:3:  [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(fp,"High 0x%02x Low 0x%02x Lock 0x%02x" EOLINE,
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:774:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"M103C: %d" EOLINE,gFuseBitsAll.M103C);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:775:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"WDTON: %d" EOLINE,gFuseBitsAll.WDTON);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:778:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SUT: %d" EOLINE,gFuseBitsAll.SUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:779:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKOPT: %d" EOLINE,gFuseBitsAll.CKOPT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:781:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"OCDEN: %d" EOLINE,gFuseBitsAll.OCDEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:782:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"JTAGEN: %d" EOLINE,gFuseBitsAll.JTAGEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:783:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SPIEN: %d" EOLINE,gFuseBitsAll.SPIEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:784:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"EESAVE: %d" EOLINE,gFuseBitsAll.EESAVE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:785:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTSIZE: %d" EOLINE,gFuseBitsAll.BOOTSIZE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:786:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTRST: %d" EOLINE,gFuseBitsAll.BOOTRST);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:787:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BODLEVEL: 0x%X" EOLINE,gFuseBitsAll.BODLEVEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:788:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BODEN: %d" EOLINE,gFuseBitsAll.BODEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:789:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:792:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"M161C: %d" EOLINE,gFuseBitsAll.M161C);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:793:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BODLEVEL: 0x%X" EOLINE,gFuseBitsAll.BODLEVEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:794:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"OCDEN: %d" EOLINE,gFuseBitsAll.OCDEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:795:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"JTAGEN: %d" EOLINE,gFuseBitsAll.JTAGEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:796:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SPIEN: %d" EOLINE,gFuseBitsAll.SPIEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:797:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"WDTON: %d" EOLINE,gFuseBitsAll.WDTON);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:798:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"EESAVE: %d" EOLINE,gFuseBitsAll.EESAVE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:799:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTSIZE: %d" EOLINE,gFuseBitsAll.BOOTSIZE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:800:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTRST: %d" EOLINE,gFuseBitsAll.BOOTRST);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:801:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKDIV8: %d" EOLINE,gFuseBitsAll.CKDIV8);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:802:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKOUT: %d" EOLINE,gFuseBitsAll.CKOUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:803:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SUT: %d" EOLINE,gFuseBitsAll.SUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:804:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:811:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BODLEVEL: 0x%X" EOLINE,gFuseBitsAll.BODLEVEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:812:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"RESETDIS: 0x%X" EOLINE,gFuseBitsAll.RESETDIS);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:813:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"OCDEN: %d" EOLINE,gFuseBitsAll.OCDEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:814:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"JTAGEN: %d" EOLINE,gFuseBitsAll.JTAGEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:815:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SPIEN: %d" EOLINE,gFuseBitsAll.SPIEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:816:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"WDTON: %d" EOLINE,gFuseBitsAll.WDTON);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:817:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"EESAVE: %d" EOLINE,gFuseBitsAll.EESAVE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:818:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTSIZE: %d" EOLINE,gFuseBitsAll.BOOTSIZE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:819:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTRST: %d" EOLINE,gFuseBitsAll.BOOTRST);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:820:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKDIV8: %d" EOLINE,gFuseBitsAll.CKDIV8);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:821:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKOUT: %d" EOLINE,gFuseBitsAll.CKOUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:822:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SUT: %d" EOLINE,gFuseBitsAll.SUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:823:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:824:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:829:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BODLEVEL: 0x%X" EOLINE,gFuseBitsAll.BODLEVEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:830:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"TA0SEL: 0x%X" EOLINE,gFuseBitsAll.TA0SEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:831:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"OCDEN: %d" EOLINE,gFuseBitsAll.OCDEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:832:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"JTAGEN: %d" EOLINE,gFuseBitsAll.JTAGEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:833:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SPIEN: %d" EOLINE,gFuseBitsAll.SPIEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:834:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"WDTON: %d" EOLINE,gFuseBitsAll.WDTON);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:835:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"EESAVE: %d" EOLINE,gFuseBitsAll.EESAVE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:836:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTSIZE: %d" EOLINE,gFuseBitsAll.BOOTSIZE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:837:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTRST: %d" EOLINE,gFuseBitsAll.BOOTRST);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:838:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKDIV8: %d" EOLINE,gFuseBitsAll.CKDIV8);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:839:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKOUT: %d" EOLINE,gFuseBitsAll.CKOUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:840:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SUT: %d" EOLINE,gFuseBitsAll.SUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:841:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:842:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:845:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"HWBE: 0x%X" EOLINE,gFuseBitsAll.HWBE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:851:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BODLEVEL: 0x%X" EOLINE,gFuseBitsAll.BODLEVEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:852:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"OCDEN: %d" EOLINE,gFuseBitsAll.OCDEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:853:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"JTAGEN: %d" EOLINE,gFuseBitsAll.JTAGEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:854:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SPIEN: %d" EOLINE,gFuseBitsAll.SPIEN);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:855:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"WDTON: %d" EOLINE,gFuseBitsAll.WDTON);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:856:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"EESAVE: %d" EOLINE,gFuseBitsAll.EESAVE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:857:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTSIZE: %d" EOLINE,gFuseBitsAll.BOOTSIZE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:858:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"BOOTRST: %d" EOLINE,gFuseBitsAll.BOOTRST);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:859:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKDIV8: %d" EOLINE,gFuseBitsAll.CKDIV8);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:860:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKOUT: %d" EOLINE,gFuseBitsAll.CKOUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:861:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"SUT: %d" EOLINE,gFuseBitsAll.SUT);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:862:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:863:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(fp,"CKSEL: 0x%X" EOLINE,gFuseBitsAll.CKSEL);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:869:3:  [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(fp,"; Lock Bit definitions (Need -L command line option to write)" EOLINE);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:870:3:  [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(fp,"BLB1: %d" EOLINE,gLockBitsAll.BLB1);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:871:3:  [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(fp,"BLB0: %d" EOLINE,gLockBitsAll.BLB0);
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:872:3:  [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(fp,"LB: %d" EOLINE,gLockBitsAll.LB);
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:163: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(mapfilename, mapdir);
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:165:7:  [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(mapfilename, mapfile);
data/xc3sprog-0+svn795+dfsg/bitparse.cpp:55:14:  [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.
      switch(getopt(argc, args, "?i:vo:O:"))
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:43:24:  [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(!(cf_name = getenv("CABLEDB")))
data/xc3sprog-0+svn795+dfsg/detectchain.cpp:85:14:  [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.
      switch(getopt(argc, args, "?hvc:d:J:LS:")) {
data/xc3sprog-0+svn795+dfsg/devicedb.cpp:47:15:  [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.
      fname = getenv("XCDB");
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:39:19:  [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 *fname = getenv("FTDI_DEBUG");
data/xc3sprog-0+svn795+dfsg/ioparport.cpp:315: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(!(dev = getenv("XCPORT")))  dev = PPDEV;
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:53: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.
  char *fname = getenv("XPC_DEBUG");
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:129:12:  [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.
    switch(getopt(argc, args, "?hJ:Lc:Cd:e:f:jp:s:v")) {
data/xc3sprog-0+svn795+dfsg/jtag.cpp:36: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.
  char *fname = getenv("JTAG_DEBUG");
data/xc3sprog-0+svn795+dfsg/libusb_dyn.c:128:27:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  HINSTANCE libusb_dll  = LoadLibrary(LIBUSB_DLL_NAME);
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:157:19:  [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(!(mapdir = getenv("XC_MAPDIR")))
data/xc3sprog-0+svn795+dfsg/pdioverjtag.cpp:31: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.
  char *fname = getenv("PDI_DEBUG");
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:63: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.
  char *fname = getenv("SPI_DEBUG");
data/xc3sprog-0+svn795+dfsg/readdna.cpp:128:14:  [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.
      switch(getopt(argc, args, "?hvc:d:J:L")) {
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:37:12:  [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.
    switch(getopt(argc, args, "?m:i:vo:O:")) {
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:683:15:  [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.
      int c = getopt(argc, args, "?hCLc:d:DeE:F:i:I::jJ:Lm:o:p:Rs:S:T::uU:vX:");
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:97:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char Buffer[256];
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:325: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).
  FILE * fp = fopen(fname, "rb" );
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:336: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).
  FILE * fp = fopen(fname, "wb" );
data/xc3sprog-0+svn795+dfsg/avrfusefile.h:60: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 devicename[256];
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:54:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char hdr[13];
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:118: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[1024];
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:170: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 buf[1024];
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:373: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).
  FILE *const  fp=fopen(fname,"rb");
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:416: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 outstr[200];
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:568:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[1024];
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:579: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(buf, "02000004%04X%c", base, 0);
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:585: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(buf, "%02X", (i & 0xf) +1 );
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:587:11:  [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.
		  len = sprintf(buf, "%02X%04X00", clip-i, i & 0xffff);
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:589:11:  [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.
		  len = sprintf(buf, "10%04X00", i & 0xffff);
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:591: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.
	    len += sprintf(buf+len, "%02X", b);
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:599: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, "00000001");
data/xc3sprog-0+svn795+dfsg/bitparse.cpp:96:5:  [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(args[0],"rb");
data/xc3sprog-0+svn795+dfsg/bitparse.cpp:124:7:  [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(outfile,"wb");
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char alias[64];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:36: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 cabletype[64];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:37: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 freq_string[64];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:38: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 options[256];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp: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).
    fp = fopen(cf_name,"rt");
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:54:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buffer[256];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:71: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).
                  cable.freq = atoi(freq_string);
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:85: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 buffer[512];
data/xc3sprog-0+svn795+dfsg/debug.cpp:51:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char tdo[10];
data/xc3sprog-0+svn795+dfsg/debug.cpp:62:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char tdo[100];
data/xc3sprog-0+svn795+dfsg/debug.cpp:79:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char tdo[100];
data/xc3sprog-0+svn795+dfsg/debug.cpp:92:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char tdo[100];
data/xc3sprog-0+svn795+dfsg/detectchain.cpp:94:21:  [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).
        jtag_freq = atoi(optarg);
data/xc3sprog-0+svn795+dfsg/devicedb.cpp:52: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).
  FILE *fp=fopen(fname,"rt");
data/xc3sprog-0+svn795+dfsg/devicedb.cpp:60: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.
          char buffer[256];
data/xc3sprog-0+svn795+dfsg/devicedb.cpp:78: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.
          char buffer[256];
data/xc3sprog-0+svn795+dfsg/iobase.h:40:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char ones[CHUNK_SIZE], zeros[CHUNK_SIZE];
data/xc3sprog-0+svn795+dfsg/iobase.h:41:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char tms_buf[CHUNK_SIZE];
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:41: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_dbg = fopen(fname,"wb");
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:53:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char   buf1[5];
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:54:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char   buf[9] = { SET_BITS_LOW, 0x00, 0x0b,
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:58: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 descstring[256];
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:421:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char rbuf[TX_BUF];
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:426:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[TX_BUF];
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:537: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(tmprbuf,rbuf,buflen);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:544: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 buf[3] = {MPSSE_WRITE_TMS|MPSSE_LSB|MPSSE_BITMODE|
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:570: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 buf[1] = { SEND_IMMEDIATE};
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:673:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char   tbuf[16] = { SET_BITS_LOW, 0xff, 0x00,
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:726: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(usbuf + bptr, buf, len);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:809:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          unsigned char buf[3] = {0x8f}; /* Clock For n x 8 bits*/
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:826:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          unsigned char buf[3];
data/xc3sprog-0+svn795+dfsg/ioftdi.h:51:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char usbuf[TX_BUF];
data/xc3sprog-0+svn795+dfsg/iofx2.cpp:42:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char descstring[256];
data/xc3sprog-0+svn795+dfsg/iofx2.cpp:107:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char sdummy[1]={0};
data/xc3sprog-0+svn795+dfsg/iofx2.cpp:226: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 string[256];
data/xc3sprog-0+svn795+dfsg/ioparport.cpp:320:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((fd = open(dev, O_RDWR)) == -1)
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:46:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[2];
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:48: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 descstring[256];
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:55: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_dbg = fopen(fname,"wb");
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:157:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      unsigned char zero[2] = {0,0};
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:263: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 buf[8];
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:450: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(xts->out, xts->buf, aligned_bytes);
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:687: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 string[256];
data/xc3sprog-0+svn795+dfsg/ioxpc.h:62: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.
        unsigned char buf[CPLD_MAX_BYTES];
data/xc3sprog-0+svn795+dfsg/javr.cpp:168:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(buffer, file.getData()+i,file.getLength() -i);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:48:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char array[15],output[16];
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:182: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.
static unsigned char gPageBuffer[(MAX_BLOCK_SIZE+1)*8+1];  /* Each bit in block is converted to 1 char */
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:254: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(dest,bPageBuffer+1,pagesize);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:537:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[EEPROM_READ_PAGE_SIZE];
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:573:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[256]; /* At least blocksize */
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:626:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[MAX_BLOCK_SIZE]; /* At least blocksize */
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:652: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(buffer+index, src, MAX_BLOCK_SIZE -index);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:658: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(buffer, src, MAX_BLOCK_SIZE);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:674:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[MAX_BLOCK_SIZE];
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:740:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buffer[2048];
data/xc3sprog-0+svn795+dfsg/javr/fuse.cpp:749:7:  [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,"wb");
data/xc3sprog-0+svn795+dfsg/javr/fuse.h:173: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 gFuseByte[3];
data/xc3sprog-0+svn795+dfsg/javr/fuse.h:190:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char gFuseByte[3];
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:116:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char DefName[256];
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:142:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      jtag_freq = atoi(optarg);
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:170:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      chainpos = atoi(optarg);
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:198:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char fname[256];
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:200: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(fname,"rb");
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:203:4:  [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(fname,".rom");
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:204:7:  [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(fname,"rb");
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:243: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).
      fp = fopen(fname,"rb");
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:246:4:  [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(fname,".eep");
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:247:7:  [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(fname,"rb");
data/xc3sprog-0+svn795+dfsg/javr/javr.h:114:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *gTAPStateNames[16]=
data/xc3sprog-0+svn795+dfsg/javr/javr.h:162: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 gEEPROMBuffer[MAX_EEPROM_SIZE];
data/xc3sprog-0+svn795+dfsg/javr/javr.h:170:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *gTAPStateNames[16];
data/xc3sprog-0+svn795+dfsg/javr/javr.h:171:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *gICEBreakerRegs[16];
data/xc3sprog-0+svn795+dfsg/javr/javr.h:172:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char gICEBreakerRegSizes[16];
data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp:88:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char inst[1];
data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp:153: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.
   unsigned char array[2],output[2];
data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp:171:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char x[1]={0xff};   /* High corresponds to external reset low */
data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp:185:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char x[1]={0};   /* High corresponds to external reset low */
data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp:196:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char inst[2];
data/xc3sprog-0+svn795+dfsg/javr/jtag.cpp:206:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char inst[2];
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[BUFSIZE];
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:137: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 buffer[BUFSIZE];
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:164: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 buffer[BUFSIZE], *p;
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:212: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 buffer[BUFSIZE];
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:241: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 buffer[BUFSIZE],tmp;
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:298: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 buffer[BUFSIZE] = {0};
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:313:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(buffer,"atmega.bin");
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:324:6:  [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(buffer,"wb");
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:343: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 buffer[BUFSIZE];
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:357:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(buffer,"atmega_ee.bin");
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:363:6:  [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(buffer,"wb");
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:384: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 buffer[BUFSIZE],tmp;
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:107: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.
   unsigned char Buffer[40];
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:113:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char fname[256];
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:116: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).
   gFuseFile=fopen(fname,"rb");
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:119:8:  [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(fname,".fus");
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:120: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).
       gFuseFile=fopen(fname,"rb");
data/xc3sprog-0+svn795+dfsg/javr/srecdec.cpp:49: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 buffer[16];
data/xc3sprog-0+svn795+dfsg/javr/srecdec.cpp:217:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char LBuf[256];
data/xc3sprog-0+svn795+dfsg/javr/srecdec.cpp:218:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char LineBuffer[100];
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:93: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 m_H_string[MAX_SIZE];
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:94: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 m_N_strings[MAX_ITEM][MAX_SIZE];
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:464:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char outstr[200];
data/xc3sprog-0+svn795+dfsg/jedecfile.h:34:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char device[MAX_SIZE];
data/xc3sprog-0+svn795+dfsg/jedecfile.h:35:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char version[MAX_SIZE];
data/xc3sprog-0+svn795+dfsg/jedecfile.h:36:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char date[MAX_SIZE];
data/xc3sprog-0+svn795+dfsg/jedecparse.cpp:48: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).
	      fp=fopen(args[1],"rb");
data/xc3sprog-0+svn795+dfsg/jedecparse.cpp:63: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).
	      fp = fopen(args[2], "wb");
data/xc3sprog-0+svn795+dfsg/jtag.cpp:38: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_dbg = fopen(fname,"wb");
data/xc3sprog-0+svn795+dfsg/libusb0/usb.h:251: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[LIBUSB_PATH_MAX];
data/xc3sprog-0+svn795+dfsg/libusb0/usb.h:270: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 dirname[LIBUSB_PATH_MAX];
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:47: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 buffer[8];
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:166:7:  [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(mapfilename, ".map");
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:168:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(mapfilename, "rb");
data/xc3sprog-0+svn795+dfsg/pdioverjtag.cpp:33: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).
    pdi_dbg = fopen(fname,"wb");
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:65: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_dbg = fopen(fname,"wb");
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:268: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 chipname[12];
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:648: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(mosi_buf+6+preamble, mosi+preamble, mosi_len);
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:656:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(last_miso, miso_buf+miso_skip, miso_len);
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:1031:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buf+4,&pfile.getData()[i-offset], rlen);
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:1287:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf+4,&pfile.getData()[i-offset], rlen);
data/xc3sprog-0+svn795+dfsg/progalgxc3s.cpp:203:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[1] = {0};
data/xc3sprog-0+svn795+dfsg/progalgxcf.cpp:430:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&(file.getData())[i*block_size/8], data, blkbytes);
data/xc3sprog-0+svn795+dfsg/progalgxcfp.cpp:226: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(data, file.getData() + p, file.getLengthBytes() - p);
data/xc3sprog-0+svn795+dfsg/readdna.cpp:137:21:  [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).
        jtag_freq = atoi(optarg);
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:35: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 buffer[16];
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:232:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char LBuf[256];
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:233: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 LineBuffer[256];
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:242: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).
  FILE * fp=fopen(fname,"rb");
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:248:4:  [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(LineBuffer,".rom");
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:249:7:  [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(LineBuffer,"rb");
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:29: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 device[256]= "";
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:87: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(args[0],"rb");
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:110:7:  [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(args[0],"rb");
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:142: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).
      fp = fopen(outfile,"wb");
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:111:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char ir_in[256];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:112:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char ir_out[256];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:113:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char din[256];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:114:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char dout[256];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:115:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char dcmp[256];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:426:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char filename[256];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:559: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).
            ret=fopen(filename,"wb");
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:572: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).
            ret = fopen(filename,"rb");
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:585:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char outname[17] = "cablelist.txt";
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:587: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(outname, O_WRONLY|O_CREAT|O_EXCL, 0644);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:590:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(outname,"cablelist.txt.1");
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:591:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(outname, O_WRONLY|O_CREAT, 0644);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:609:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(outname,"devlist.txt");
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:610: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(outname, O_WRONLY|O_CREAT|O_EXCL, 0644);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:613:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(outname,"devlist.txt.1");
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:614:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(outname, O_WRONLY|O_CREAT, 0644);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:665: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 osname[OSNAME_LEN];
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:719:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	test_count = atoi(optarg);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:725:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      jtag_freq = atoi(optarg);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:1211:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                  memcpy(promfile.getData() + prom_pos - promfile_offset, tmp_bitfile.getData(), tmp_bitfile.getLength() / 8);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:1222:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                  memcpy(tmp_bitfile.getData(), promfile.getData() + prom_pos - promfile_offset, n);
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:119:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      c=fgetc(gFuseFile);
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:135:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      c=fgetc(gFuseFile);
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:286:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      c=fgetc(gFuseFile);
data/xc3sprog-0+svn795+dfsg/avrfusefile.cpp:297: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).
					    strlen(gAVR_Data[i].name))))
data/xc3sprog-0+svn795+dfsg/bitfile.cpp:687: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).
	len = strlen(stylestr);
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:56: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).
          i = strlen(buffer);
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:62:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	  if (sscanf(buffer,"%64s %64s %64s %255[^;]",
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:72: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).
              cable.alias = new char[strlen(alias)+1];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:75:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              cable.optstring = new char[strlen(options)+1];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:104:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	  if (sscanf(buffer,"%64s %64s %d %255[^;]",
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:107: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).
                cable.alias = new char[strlen(alias)+1];
data/xc3sprog-0+svn795+dfsg/cabledb.cpp:110:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                cable.optstring = new char[strlen(options)+1];
data/xc3sprog-0+svn795+dfsg/devicedb.cpp:122: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).
  vector<char> textvec(strlen(linebuf) + 1);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:96:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int len = q ? q-p : strlen(p);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:102:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(descstring, p, num);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:586:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        res = FT_Read(ftd2xx_handle, rbuf, length, &read);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:592:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((read <length) && ( timeout <100 ))
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:595:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            res = FT_Read(ftd2xx_handle, rbuf+read, length-read, &last_read);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:595:60:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            res = FT_Read(ftd2xx_handle, rbuf+read, length-read, &last_read);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:609:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read != len)
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:612:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    (unsigned long)read, len);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:626:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while (((int)read <length) && ( timeout <1000))
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:630:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            last_read = ftdi_read_data(ftdi_handle, rbuf+read, length -read);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:630:72:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            last_read = ftdi_read_data(ftdi_handle, rbuf+read, length -read);
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:664:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return read;
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:669:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int read;
data/xc3sprog-0+svn795+dfsg/ioftdi.cpp:683:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if  (read != 5)
data/xc3sprog-0+svn795+dfsg/iofx2.cpp:70: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).
          len = strlen(p);
data/xc3sprog-0+svn795+dfsg/iofx2.cpp:72:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(descstring, p, (len>256)?256:len);
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:82: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).
          len = strlen(p);
data/xc3sprog-0+svn795+dfsg/ioxpc.cpp:84:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(descstring, p, (len>256)?256:len);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:166:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(1000);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.cpp:349:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(1000);
data/xc3sprog-0+svn795+dfsg/javr/avr_jtag.h:39:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
#define usleep(x) Sleep((x+999)/1000)
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:199:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(fname,args[0],250);
data/xc3sprog-0+svn795+dfsg/javr/javr.cpp:242:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(fname, eepromfile, 250);
data/xc3sprog-0+svn795+dfsg/javr/menu.cpp:156:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      buffer[strlen(buffer) -1] = 0;
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:115:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(fname,gFuseName,250);
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:145:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c=fgetc(gFuseFile);
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:160:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c=fgetc(gFuseFile);
data/xc3sprog-0+svn795+dfsg/javr/parse.cpp:325:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c=fgetc(gFuseFile);
data/xc3sprog-0+svn795+dfsg/javr/srecdec.cpp:230: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).
    i = strlen(LineBuffer);
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:123:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	       strncpy(m->jed->date, ptr, MAX_SIZE);
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:255:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(m->jed->device, m_N_strings[1], MAX_SIZE);
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:260:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(m->jed->version, m_N_strings[1], MAX_SIZE);
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:390:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((ch = fgetc(fp)) != EOF) {
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:460: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(jed.date) == 0)
data/xc3sprog-0+svn795+dfsg/jedecfile.cpp:476: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(jed.version) == 0)
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:50:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((x = fgetc(fp)) != EOF)
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:160: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).
  mapfilename = (char *) malloc(strlen(mapdir)+strlen(mapfile)+6);
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:160: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).
  mapfilename = (char *) malloc(strlen(mapdir)+strlen(mapfile)+6);
data/xc3sprog-0+svn795+dfsg/mapfile_xc2c.cpp:164:7:  [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(mapfilename, "/");
data/xc3sprog-0+svn795+dfsg/progalg.h:19:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual int read(BitFile &file) = 0;
data/xc3sprog-0+svn795+dfsg/progalgspiflash.cpp:723:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int ProgAlgSPIFlash::read(BitFile &rfile)
data/xc3sprog-0+svn795+dfsg/progalgspiflash.h:89:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int read(BitFile &file);
data/xc3sprog-0+svn795+dfsg/progalgxcf.cpp:369:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int ProgAlgXCF::read(BitFile &file)
data/xc3sprog-0+svn795+dfsg/progalgxcf.h:63:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual int read(BitFile &file);
data/xc3sprog-0+svn795+dfsg/progalgxcfp.cpp:503:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int ProgAlgXCFP::read(BitFile &file)
data/xc3sprog-0+svn795+dfsg/progalgxcfp.h:38:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual int read(BitFile &file);
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:204:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     c=fgetc(fp);
data/xc3sprog-0+svn795+dfsg/srecfile.cpp:247:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(LineBuffer,fname, 252);
data/xc3sprog-0+svn795+dfsg/utilities.cpp:151:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(usec);
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:102:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(device, fuses.getDevice(), 255);
data/xc3sprog-0+svn795+dfsg/xc2c_warp.cpp:124:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(device, bits.getPartName(), 255);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:451: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).
            len = strlen(p);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:455:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(filename, p, num);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:472: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).
            len = strlen(p);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:495: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).
            len = strlen(p);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:519: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).
            len = strlen(p);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:1205:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              alg->read(cur_bitfile);
data/xc3sprog-0+svn795+dfsg/xc3sprog.cpp:1314:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            alg.read(spifile);

ANALYSIS SUMMARY:

Hits = 342
Lines analyzed = 21903 in approximately 0.62 seconds (35603 lines/second)
Physical Source Lines of Code (SLOC) = 16832
Hits@level = [0] 1019 [1]  71 [2] 173 [3]  16 [4]  82 [5]   0
Hits@level+ = [0+] 1361 [1+] 342 [2+] 271 [3+]  98 [4+]  82 [5+]   0
Hits/KSLOC@level+ = [0+] 80.8579 [1+] 20.3184 [2+] 16.1003 [3+] 5.82224 [4+] 4.87167 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.