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/hfsutils-3.2.6/acconfig.h
Examining data/hfsutils-3.2.6/binhex.h
Examining data/hfsutils-3.2.6/charset.c
Examining data/hfsutils-3.2.6/charset.h
Examining data/hfsutils-3.2.6/copyin.h
Examining data/hfsutils-3.2.6/copyout.h
Examining data/hfsutils-3.2.6/crc.c
Examining data/hfsutils-3.2.6/crc.h
Examining data/hfsutils-3.2.6/darray.c
Examining data/hfsutils-3.2.6/darray.h
Examining data/hfsutils-3.2.6/dlist.c
Examining data/hfsutils-3.2.6/dlist.h
Examining data/hfsutils-3.2.6/dstring.c
Examining data/hfsutils-3.2.6/dstring.h
Examining data/hfsutils-3.2.6/glob.c
Examining data/hfsutils-3.2.6/glob.h
Examining data/hfsutils-3.2.6/hattrib.c
Examining data/hfsutils-3.2.6/hattrib.h
Examining data/hfsutils-3.2.6/hcd.c
Examining data/hfsutils-3.2.6/hcd.h
Examining data/hfsutils-3.2.6/hcopy.c
Examining data/hfsutils-3.2.6/hcopy.h
Examining data/hfsutils-3.2.6/hcwd.h
Examining data/hfsutils-3.2.6/hdel.c
Examining data/hfsutils-3.2.6/hdel.h
Examining data/hfsutils-3.2.6/hformat.c
Examining data/hfsutils-3.2.6/hformat.h
Examining data/hfsutils-3.2.6/hfssh.c
Examining data/hfsutils-3.2.6/hfsutil.c
Examining data/hfsutils-3.2.6/hfswish.c
Examining data/hfsutils-3.2.6/hls.c
Examining data/hfsutils-3.2.6/hls.h
Examining data/hfsutils-3.2.6/hmkdir.c
Examining data/hfsutils-3.2.6/hmkdir.h
Examining data/hfsutils-3.2.6/hmount.c
Examining data/hfsutils-3.2.6/hmount.h
Examining data/hfsutils-3.2.6/hpwd.c
Examining data/hfsutils-3.2.6/hpwd.h
Examining data/hfsutils-3.2.6/hrename.c
Examining data/hfsutils-3.2.6/hrename.h
Examining data/hfsutils-3.2.6/hrmdir.c
Examining data/hfsutils-3.2.6/hrmdir.h
Examining data/hfsutils-3.2.6/humount.c
Examining data/hfsutils-3.2.6/humount.h
Examining data/hfsutils-3.2.6/hvol.c
Examining data/hfsutils-3.2.6/hvol.h
Examining data/hfsutils-3.2.6/images.h
Examining data/hfsutils-3.2.6/strdup.c
Examining data/hfsutils-3.2.6/strerror.c
Examining data/hfsutils-3.2.6/strstr.c
Examining data/hfsutils-3.2.6/strtol.c
Examining data/hfsutils-3.2.6/suid.c
Examining data/hfsutils-3.2.6/suid.h
Examining data/hfsutils-3.2.6/tclhfs.h
Examining data/hfsutils-3.2.6/version.c
Examining data/hfsutils-3.2.6/version.h
Examining data/hfsutils-3.2.6/xhfs.h
Examining data/hfsutils-3.2.6/hfsck/ck_btree.c
Examining data/hfsutils-3.2.6/hfsck/ck_btree.h
Examining data/hfsutils-3.2.6/hfsck/ck_mdb.c
Examining data/hfsutils-3.2.6/hfsck/ck_mdb.h
Examining data/hfsutils-3.2.6/hfsck/ck_volume.c
Examining data/hfsutils-3.2.6/hfsck/ck_volume.h
Examining data/hfsutils-3.2.6/hfsck/hfsck.c
Examining data/hfsutils-3.2.6/hfsck/hfsck.h
Examining data/hfsutils-3.2.6/hfsck/main.c
Examining data/hfsutils-3.2.6/hfsck/util.c
Examining data/hfsutils-3.2.6/hfsck/util.h
Examining data/hfsutils-3.2.6/libhfs/os/unix.c
Examining data/hfsutils-3.2.6/libhfs/acconfig.h
Examining data/hfsutils-3.2.6/libhfs/apple.h
Examining data/hfsutils-3.2.6/libhfs/block.c
Examining data/hfsutils-3.2.6/libhfs/block.h
Examining data/hfsutils-3.2.6/libhfs/btree.c
Examining data/hfsutils-3.2.6/libhfs/btree.h
Examining data/hfsutils-3.2.6/libhfs/data.c
Examining data/hfsutils-3.2.6/libhfs/data.h
Examining data/hfsutils-3.2.6/libhfs/file.c
Examining data/hfsutils-3.2.6/libhfs/file.h
Examining data/hfsutils-3.2.6/libhfs/hfs.c
Examining data/hfsutils-3.2.6/libhfs/hfs.h
Examining data/hfsutils-3.2.6/libhfs/low.c
Examining data/hfsutils-3.2.6/libhfs/low.h
Examining data/hfsutils-3.2.6/libhfs/medium.c
Examining data/hfsutils-3.2.6/libhfs/medium.h
Examining data/hfsutils-3.2.6/libhfs/memcmp.c
Examining data/hfsutils-3.2.6/libhfs/node.c
Examining data/hfsutils-3.2.6/libhfs/node.h
Examining data/hfsutils-3.2.6/libhfs/os.h
Examining data/hfsutils-3.2.6/libhfs/record.c
Examining data/hfsutils-3.2.6/libhfs/record.h
Examining data/hfsutils-3.2.6/libhfs/version.c
Examining data/hfsutils-3.2.6/libhfs/version.h
Examining data/hfsutils-3.2.6/libhfs/volume.c
Examining data/hfsutils-3.2.6/libhfs/volume.h
Examining data/hfsutils-3.2.6/libhfs/libhfs.h
Examining data/hfsutils-3.2.6/librsrc/acconfig.h
Examining data/hfsutils-3.2.6/librsrc/data.c
Examining data/hfsutils-3.2.6/librsrc/data.h
Examining data/hfsutils-3.2.6/librsrc/main.c
Examining data/hfsutils-3.2.6/librsrc/rsrc.c
Examining data/hfsutils-3.2.6/librsrc/rsrc.h
Examining data/hfsutils-3.2.6/librsrc/version.c
Examining data/hfsutils-3.2.6/librsrc/version.h
Examining data/hfsutils-3.2.6/librsrc/librsrc.h
Examining data/hfsutils-3.2.6/linux/fsck.c
Examining data/hfsutils-3.2.6/linux/hdump.c
Examining data/hfsutils-3.2.6/linux/mkfs.c
Examining data/hfsutils-3.2.6/linux/kernel/module.c
Examining data/hfsutils-3.2.6/binhex.c
Examining data/hfsutils-3.2.6/copyin.c
Examining data/hfsutils-3.2.6/copyout.c
Examining data/hfsutils-3.2.6/hcwd.c
Examining data/hfsutils-3.2.6/hfsutil.h
Examining data/hfsutils-3.2.6/tclhfs.c

FINAL RESULTS:

data/hfsutils-3.2.6/charset.c:192:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(ptr, subst);
data/hfsutils-3.2.6/charset.c:272:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(ptr, subst);
data/hfsutils-3.2.6/copyout.c:141:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *) &buf[2], ent.name);
data/hfsutils-3.2.6/copyout.c:454:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(name, ent.name);
data/hfsutils-3.2.6/copyout.c:471:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(name, ext);
data/hfsutils-3.2.6/copyout.c:504:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(path, dstname);
data/hfsutils-3.2.6/copyout.c:506:4:  [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(path, hint);
data/hfsutils-3.2.6/dlist.c:114:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(list->strs, str);
data/hfsutils-3.2.6/hcd.c:77: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(root, vent.name);
data/hfsutils-3.2.6/hcwd.c:92:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(path, home);
data/hfsutils-3.2.6/hcwd.c:93:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(path, "/" STATEFNAME);
data/hfsutils-3.2.6/hcwd.c:118:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(entry.vname, start);
data/hfsutils-3.2.6/hcwd.c:243:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(entry->vname, vname);
data/hfsutils-3.2.6/hcwd.c:256:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(new.vname, vname);
data/hfsutils-3.2.6/hfsck/util.c:42:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(str, ctime(&date));
data/hfsutils-3.2.6/hfsck/util.c:90: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(str, extstr(ext));
data/hfsutils-3.2.6/hfsck/util.c:119:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(question, args);
data/hfsutils-3.2.6/hfsck/util.c:170:6:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    vprintf(question, args);
data/hfsutils-3.2.6/hfsutil.c:361: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(buf, cwd);
data/hfsutils-3.2.6/hfsutil.c:398:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(buf, path);
data/hfsutils-3.2.6/hls.c:418: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(timebuf, ctime(&when));
data/hfsutils-3.2.6/hls.c:422:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(timebuf + 11, timebuf + 19);
data/hfsutils-3.2.6/libhfs/file.c:46:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(file->name, name);
data/hfsutils-3.2.6/libhfs/hfs.c:324:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(ent->name, vol->mdb.drVN);
data/hfsutils-3.2.6/libhfs/hfs.c:464:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(name, thread.u.dthd.thdCName);
data/hfsutils-3.2.6/libhfs/hfs.c:1294: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(dstname, srcname);
data/hfsutils-3.2.6/libhfs/hfs.c:1314:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(dstname, ptr);
data/hfsutils-3.2.6/libhfs/hfs.c:1359: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(vol->mdb.drVN, dstname);
data/hfsutils-3.2.6/libhfs/hfs.c:1387: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(dst.u.dthd.thdCName, dstname);
data/hfsutils-3.2.6/libhfs/hfs.c:1401:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(dst.u.fthd.fthdCName, dstname);
data/hfsutils-3.2.6/libhfs/hfs.c:1597:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(vol.mdb.drVN, vname);
data/hfsutils-3.2.6/libhfs/medium.c:256:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *) map.pmPartName, name);
data/hfsutils-3.2.6/libhfs/medium.c:257:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *) map.pmParType,  type);
data/hfsutils-3.2.6/libhfs/record.c:415:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(key->ckrCName, name);
data/hfsutils-3.2.6/libhfs/record.c:507:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(ent->name, name);
data/hfsutils-3.2.6/libhfs/volume.c:512: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(cname, key.ckrCName);
data/hfsutils-3.2.6/libhfs/volume.c:883:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(fname, name);
data/hfsutils-3.2.6/libhfs/volume.c:1010:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(data.u.dthd.thdCName, name);
data/hfsutils-3.2.6/librsrc/main.c:83:14:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	      hex = popen("hex", "w");
data/hfsutils-3.2.6/strdup.c:39:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(ns, s);
data/hfsutils-3.2.6/hcopy.c:268:13:  [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.
      opt = getopt(argc, argv, "mbtra");
data/hfsutils-3.2.6/hcwd.c:84:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  home = getenv("HOME");
data/hfsutils-3.2.6/hformat.c:92:13:  [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.
      opt = getopt(argc, argv, "fl:");
data/hfsutils-3.2.6/hfsck/main.c:85:13:  [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.
      opt = getopt(argc, argv, "vna");
data/hfsutils-3.2.6/hfsutil.c:354:9:  [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.
  cwd = getenv("PWD");
data/hfsutils-3.2.6/hls.c:857:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  ptr   = getenv("COLUMNS");
data/hfsutils-3.2.6/hls.c:874:13:  [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.
      opt = getopt(argc, argv, "1abcdfilmqrstxw:CFNQRSU");
data/hfsutils-3.2.6/binhex.c:44:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char line[67];			/* ASCII line buffer */
data/hfsutils-3.2.6/binhex.c:52: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 zero[2] = { 0, 0 };
data/hfsutils-3.2.6/binhex.c:62:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
signed char demap[256] = {
data/hfsutils-3.2.6/binhex.c:289: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 word[2];
data/hfsutils-3.2.6/binhex.c:555: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 word[2];
data/hfsutils-3.2.6/charset.c:75: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 *macroman_subst[128] = {
data/hfsutils-3.2.6/charset.c:99: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 latin1[256];
data/hfsutils-3.2.6/charset.c:102: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 *latin1_subst[128] = {
data/hfsutils-3.2.6/copyin.c:29:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int open(const char *, int, ...);
data/hfsutils-3.2.6/copyin.c:70: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[HFS_BLOCKSZ * 4];
data/hfsutils-3.2.6/copyin.c:146: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[HFS_BLOCKSZ * 4];
data/hfsutils-3.2.6/copyin.c:224: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[HFS_BLOCKSZ * 4], *ptr;
data/hfsutils-3.2.6/copyin.c:278: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[HFS_BLOCKSZ * 4];
data/hfsutils-3.2.6/copyin.c:319: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 name[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/copyin.c:329:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(srcname, O_RDONLY);
data/hfsutils-3.2.6/copyin.c:357: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(name, cptr, len);
data/hfsutils-3.2.6/copyin.c:464: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 type[5], creator[5];
data/hfsutils-3.2.6/copyin.c:465: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[MACB_BLOCKSZ];
data/hfsutils-3.2.6/copyin.c:531: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(type,    &buf[65], 4);
data/hfsutils-3.2.6/copyin.c:532: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(creator, &buf[69], 4);
data/hfsutils-3.2.6/copyin.c:576: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 byte, word[2], lword[4];
data/hfsutils-3.2.6/copyin.c:652: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 fname[HFS_MAX_FLEN + 1], type[5], creator[5];
data/hfsutils-3.2.6/copyout.c:29:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int open(const char *, int, ...);
data/hfsutils-3.2.6/copyout.c:65: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[HFS_BLOCKSZ * 4];
data/hfsutils-3.2.6/copyout.c:129: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[MACB_BLOCKSZ];
data/hfsutils-3.2.6/copyout.c:143:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&buf[65], ent.u.file.type,    4);
data/hfsutils-3.2.6/copyout.c:144:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&buf[69], ent.u.file.creator, 4);
data/hfsutils-3.2.6/copyout.c:199: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[HFS_BLOCKSZ * 4];
data/hfsutils-3.2.6/copyout.c:246: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 byte, word[2], lword[4];
data/hfsutils-3.2.6/copyout.c:340: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[HFS_BLOCKSZ * 4], *ptr;
data/hfsutils-3.2.6/copyout.c:394: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[HFS_BLOCKSZ * 4];
data/hfsutils-3.2.6/copyout.c:436: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 name[HFS_MAX_FLEN + 4 + 1];
data/hfsutils-3.2.6/copyout.c:511: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).
      fd = open(dstname, O_WRONLY | O_CREAT | O_TRUNC, 0666);
data/hfsutils-3.2.6/darray.c:117: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(eltend, elem, elemsz);
data/hfsutils-3.2.6/dlist.c:103: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(newlist.strs, list->strs, strsz);
data/hfsutils-3.2.6/dstring.c:70:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(new, string->str, string->len);
data/hfsutils-3.2.6/dstring.c:80: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(string->str + string->len, str, len);
data/hfsutils-3.2.6/dstring.h:26: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 sbuf[50];
data/hfsutils-3.2.6/hattrib.c:200: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(ent.u.file.type, type, 4);
data/hfsutils-3.2.6/hattrib.c:202: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(ent.u.file.creator, crea, 4);
data/hfsutils-3.2.6/hcd.c:44: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 *path, root[HFS_MAX_VLEN + 1 + 1];
data/hfsutils-3.2.6/hcwd.c:80: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[512], *path, *ptr;
data/hfsutils-3.2.6/hcwd.c:95: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).
  statef = fopen(path, "r+");
data/hfsutils-3.2.6/hcwd.c:97: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).
    statef = fopen(path, "w+");
data/hfsutils-3.2.6/hcwd.c:105:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    newcur = atoi(buf);
data/hfsutils-3.2.6/hcwd.c:151: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).
	  entry.partno = atoi(start);
data/hfsutils-3.2.6/hcwd.c:355: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(ent->vname, newcwd, path - newcwd);
data/hfsutils-3.2.6/hcwd.h:23: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 vname[HFS_MAX_VLEN + 1];
data/hfsutils-3.2.6/hformat.c:131:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      partno = atoi(argv[optind + 1]);
data/hfsutils-3.2.6/hfsck/ck_mdb.c:212: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(&vol->ext.f.cat.u.fil.filExtRec,
data/hfsutils-3.2.6/hfsck/ck_mdb.c:228: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(&vol->cat.f.cat.u.fil.filExtRec,
data/hfsutils-3.2.6/hfsck/main.c:127:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      pnum = atoi(argv[optind + 1]);
data/hfsutils-3.2.6/hfsck/util.c:36:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char str[26];
data/hfsutils-3.2.6/hfsck/util.c:54: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 str[20];
data/hfsutils-3.2.6/hfsck/util.c:62:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(str, "1[%u]", ext->xdrStABN);
data/hfsutils-3.2.6/hfsck/util.c:66:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(str, "%u[%u..%u]", ext->xdrNumABlks,
data/hfsutils-3.2.6/hfsck/util.c:79: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 str[60];
data/hfsutils-3.2.6/hfsck/util.c:135: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 answer[80];
data/hfsutils-3.2.6/hfsutil.c:278: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 *path, name[HFS_MAX_FLEN + 1 + 1];
data/hfsutils-3.2.6/hfsutil.c:319: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(path, name, namelen);
data/hfsutils-3.2.6/hls.c:260: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 buf[5];
data/hfsutils-3.2.6/hls.c:301: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(buf, "%c", *ptr);
data/hfsutils-3.2.6/hls.c:306: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(buf, "\\%03o", (unsigned char) *ptr);
data/hfsutils-3.2.6/hls.c:315:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		  sprintf(buf, "%c", *ptr);
data/hfsutils-3.2.6/hls.c:400: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 timebuf[26];
data/hfsutils-3.2.6/hls.c:858:17:  [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).
  width = ptr ? atoi(ptr) : 80;
data/hfsutils-3.2.6/hls.c:947:12:  [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).
	  width = atoi(optarg);
data/hfsutils-3.2.6/hmount.c:68:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    partno = atoi(argv[2]);
data/hfsutils-3.2.6/libhfs/apple.h:29:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char		Str15[16];
data/hfsutils-3.2.6/libhfs/apple.h:30: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.
typedef char		Str31[32];
data/hfsutils-3.2.6/libhfs/apple.h:168: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		drVN[28];	/* volume name (1-27 chars) */
data/hfsutils-3.2.6/libhfs/block.c:198: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(blist[i]->data, buffer[i], HFS_BLOCKSZ);
data/hfsutils-3.2.6/libhfs/block.c:253: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[i], blist[i]->data, HFS_BLOCKSZ);
data/hfsutils-3.2.6/libhfs/block.c:667: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(bp, b->data, HFS_BLOCKSZ);
data/hfsutils-3.2.6/libhfs/block.c:701: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(b->data, bp, HFS_BLOCKSZ);
data/hfsutils-3.2.6/libhfs/btree.c:187: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(map, HFS_NODEREC(bt->hdrnd, 2), HFS_MAP1SZ);
data/hfsutils-3.2.6/libhfs/btree.c:214: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(map + bt->mapsz, HFS_NODEREC(n, 0), HFS_MAPXSZ);
data/hfsutils-3.2.6/libhfs/btree.c:259: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(HFS_NODEREC(bt->hdrnd, 2), bt->map, HFS_MAP1SZ);
data/hfsutils-3.2.6/libhfs/btree.c:285: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(HFS_NODEREC(n, 0), map, HFS_MAPXSZ);
data/hfsutils-3.2.6/libhfs/btree.c:491: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(newrec, record, reclen);
data/hfsutils-3.2.6/libhfs/data.c:41: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 hfs_charorder[256] = {
data/hfsutils-3.2.6/libhfs/data.c:372:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest, *ptr + 1, len);
data/hfsutils-3.2.6/libhfs/data.c:395: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(*ptr, src, len);
data/hfsutils-3.2.6/libhfs/file.c:107: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(&file->ext, fork == fkData ?
data/hfsutils-3.2.6/libhfs/file.c:168: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->ext, extrec, sizeof(ExtDataRec));
data/hfsutils-3.2.6/libhfs/file.c:294: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(extrec, &file->ext, sizeof(ExtDataRec));
data/hfsutils-3.2.6/libhfs/file.c:379: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->ext, extrec, sizeof(ExtDataRec));
data/hfsutils-3.2.6/libhfs/file.c:470: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(extrec, &file->ext, sizeof(ExtDataRec));
data/hfsutils-3.2.6/libhfs/hfs.c:545:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char cname[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/libhfs/hfs.c:659:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/libhfs/hfs.c:834: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(ptr, b + offs, chunk);
data/hfsutils-3.2.6/libhfs/hfs.c:903: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(b + offs, ptr, chunk);
data/hfsutils-3.2.6/libhfs/hfs.c:1034:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/libhfs/hfs.c:1110:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/libhfs/hfs.c:1144:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/libhfs/hfs.c:1266: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 srcname[HFS_MAX_FLEN + 1], dstname[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/libhfs/hfs.h: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 name[HFS_MAX_VLEN + 1];	/* name of volume (MacOS Standard Roman) */
data/hfsutils-3.2.6/libhfs/hfs.h:55:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1];	/* catalog name (MacOS Standard Roman) */
data/hfsutils-3.2.6/libhfs/hfs.h:76: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 type[5];		/* file type code (plus null) */
data/hfsutils-3.2.6/libhfs/hfs.h:77: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 creator[5];		/* file creator code (plus null) */
data/hfsutils-3.2.6/libhfs/libhfs.h:133:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1];	/* catalog name of this file */
data/hfsutils-3.2.6/libhfs/low.c:250: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(bootcode, ptr, HFS_BOOTCODE1LEN);
data/hfsutils-3.2.6/libhfs/low.c:255: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(bootcode + HFS_BOOTCODE1LEN, b, HFS_BOOTCODE2LEN);
data/hfsutils-3.2.6/libhfs/low.c:298: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(ptr, bootcode, HFS_BOOTCODE1LEN);
data/hfsutils-3.2.6/libhfs/low.c:306: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(&b, bootcode + HFS_BOOTCODE1LEN, HFS_BOOTCODE2LEN);
data/hfsutils-3.2.6/libhfs/medium.c:93:3:  [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((char *) map.pmPartName, "Apple");
data/hfsutils-3.2.6/libhfs/medium.c:94:3:  [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((char *) map.pmParType,  "Apple_partition_map");
data/hfsutils-3.2.6/libhfs/medium.c:122:3:  [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((char *) map.pmPartName, "Extra");
data/hfsutils-3.2.6/libhfs/medium.c:123:3:  [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((char *) map.pmParType,  "Apple_Free");
data/hfsutils-3.2.6/libhfs/medium.c:272: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((char *) map.pmPartName, "Extra");
data/hfsutils-3.2.6/libhfs/medium.c:273: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((char *) map.pmParType,  "Apple_Free");
data/hfsutils-3.2.6/libhfs/node.c:236: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(record + 1, key + 1, HFS_RECKEYLEN(key));
data/hfsutils-3.2.6/libhfs/node.c:239: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(record, key, HFS_RECKEYSKIP(key));
data/hfsutils-3.2.6/libhfs/node.c:366: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(HFS_NODEREC(*np, rnum), record, reclen);
data/hfsutils-3.2.6/libhfs/node.c:398: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(HFS_NODEREC(*left, left->nd.ndNRecs),
data/hfsutils-3.2.6/libhfs/os/unix.c:34:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int open(const char *, int, ...);
data/hfsutils-3.2.6/libhfs/os/unix.c:76:8:  [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(path, mode);
data/hfsutils-3.2.6/libhfs/volume.c:312: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(&vol->ext.f.cat.u.fil.filExtRec,
data/hfsutils-3.2.6/libhfs/volume.c:326: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(&vol->cat.f.cat.u.fil.filExtRec,
data/hfsutils-3.2.6/libhfs/volume.c:346: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(&vol->mdb.drXTExtRec,
data/hfsutils-3.2.6/libhfs/volume.c:350: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(&vol->mdb.drCTExtRec,
data/hfsutils-3.2.6/libhfs/volume.c:544: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(&extsave, &file->ext, sizeof(ExtDataRec));
data/hfsutils-3.2.6/libhfs/volume.c:549: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(&file->ext, &extsave, sizeof(ExtDataRec));
data/hfsutils-3.2.6/libhfs/volume.c:599: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(HFS_RECDATA(ptr), pdata, len);
data/hfsutils-3.2.6/libhfs/volume.c:616: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(HFS_RECDATA(ptr), pdata, len);
data/hfsutils-3.2.6/libhfs/volume.c:764:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[HFS_MAX_FLEN + 1], *nptr;
data/hfsutils-3.2.6/librsrc/data.c:41: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 hfs_charorder[256] = {
data/hfsutils-3.2.6/librsrc/data.c:354:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest, *ptr + 1, len);
data/hfsutils-3.2.6/librsrc/data.c:377: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(*ptr, src, len);
data/hfsutils-3.2.6/librsrc/main.c:62: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 type[5];
data/hfsutils-3.2.6/librsrc/rsrc.c:92: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(rfile->map.data, head, sizeof(head));
data/hfsutils-3.2.6/librsrc/rsrc.c:190: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(type, rfile->map.tlist + 2 + 8 * (index - 1), 4);
data/hfsutils-3.2.6/librsrc/rsrc.c:248:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[256];
data/hfsutils-3.2.6/librsrc/rsrc.c:251: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(name, nptr + 1, *nptr);
data/hfsutils-3.2.6/librsrc/rsrc.c:294: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(rsrc->data, data + 4, count);
data/hfsutils-3.2.6/strerror.c:45: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 str[14 + CHARLEN(int) + 1];
data/hfsutils-3.2.6/strerror.c:71: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(str, "System error #%d", errnum);
data/hfsutils-3.2.6/tclhfs.c:87: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 c[2];
data/hfsutils-3.2.6/tclhfs.c:113: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
data/hfsutils-3.2.6/tclhfs.c:122: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 *argv[24];
data/hfsutils-3.2.6/tclhfs.c:130: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(cnid,   "%lu", ent->cnid);
data/hfsutils-3.2.6/tclhfs.c:131: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(parid,  "%lu", ent->parid);
data/hfsutils-3.2.6/tclhfs.c:145:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(dsize, "%u", ent->u.dir.valence);
data/hfsutils-3.2.6/tclhfs.c:170:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(rsize,  "%lu", ent->u.file.rsize);
data/hfsutils-3.2.6/tclhfs.c:171:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(dsize,  "%lu", ent->u.file.dsize);
data/hfsutils-3.2.6/tclhfs.c:180: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(crdate, "%ld", (long) ent->crdate);
data/hfsutils-3.2.6/tclhfs.c:181: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(mddate, "%ld", (long) ent->mddate);
data/hfsutils-3.2.6/tclhfs.c:182: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(bkdate, "%ld", (long) ent->bkdate);
data/hfsutils-3.2.6/tclhfs.c:304:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%lu", offset);
data/hfsutils-3.2.6/tclhfs.c:365:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%lu", offset);
data/hfsutils-3.2.6/tclhfs.c:407:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%lu", bytes);
data/hfsutils-3.2.6/tclhfs.c:444:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%lu", offset);
data/hfsutils-3.2.6/tclhfs.c:470: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[HFS_BLOCKSZ * 8];
data/hfsutils-3.2.6/tclhfs.c:504: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(interp->result, "hfsfile%d", id++);
data/hfsutils-3.2.6/tclhfs.c:839:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%lu %lu", ent.totbytes, ent.freebytes);
data/hfsutils-3.2.6/tclhfs.c:846:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%ld", (long) ent.crdate);
data/hfsutils-3.2.6/tclhfs.c:853:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(interp->result, "%ld", (long) ent.mddate);
data/hfsutils-3.2.6/tclhfs.c:872: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(interp->result, "%lu", vref->cwd);
data/hfsutils-3.2.6/tclhfs.c:875: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 name[HFS_MAX_FLEN + 1];
data/hfsutils-3.2.6/tclhfs.c:942: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 name[HFS_MAX_FLEN + 1], idstr[CHARLEN(unsigned long) + 1];
data/hfsutils-3.2.6/tclhfs.c:950:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(idstr, "%lu", id);
data/hfsutils-3.2.6/tclhfs.c:1200:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(interp->result, "must specify partition number "
data/hfsutils-3.2.6/tclhfs.c:1234: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(interp->result, "hfsvol%d", id++);
data/hfsutils-3.2.6/tclhfs.c:1257:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(interp->result, "%lu", len);
data/hfsutils-3.2.6/tclhfs.c:1289:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(interp->result, "%d", nparts);
data/hfsutils-3.2.6/binhex.c:372:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getc(file);
data/hfsutils-3.2.6/binhex.c:395:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getc(file);
data/hfsutils-3.2.6/binhex.c:410:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getc(file);
data/hfsutils-3.2.6/binhex.c:442:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(file);
data/hfsutils-3.2.6/binhex.c:587:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(file);
data/hfsutils-3.2.6/binhex.c:595:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getc(file);
data/hfsutils-3.2.6/charset.c:135:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = lenptr ? *lenptr : strlen(mstr);
data/hfsutils-3.2.6/charset.c:162:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ilen = lenptr ? *lenptr : strlen(mstr);
data/hfsutils-3.2.6/charset.c:171: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).
	olen += strlen(macroman_subst[ch & 0x7f]);
data/hfsutils-3.2.6/charset.c:193:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  ptr += strlen(subst);
data/hfsutils-3.2.6/charset.c:242:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ilen = lenptr ? *lenptr : strlen(lstr);
data/hfsutils-3.2.6/charset.c:251: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).
	olen += strlen(latin1_subst[ch & 0x7f]);
data/hfsutils-3.2.6/charset.c:273:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  ptr += strlen(subst);
data/hfsutils-3.2.6/copyin.c:78:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bytes = read(ifile, buf, chunk);
data/hfsutils-3.2.6/copyin.c:230:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      chunk = read(ifile, buf, sizeof(buf));
data/hfsutils-3.2.6/copyin.c:283:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      chunk = read(ifile, buf, sizeof(buf));
data/hfsutils-3.2.6/copyin.c:344:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(cptr);
data/hfsutils-3.2.6/copyin.c:349: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(cptr);
data/hfsutils-3.2.6/copyin.c:473:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(ifile, buf, MACB_BLOCKSZ) < MACB_BLOCKSZ)
data/hfsutils-3.2.6/copyout.c:140:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  buf[1] = strlen(ent.name);
data/hfsutils-3.2.6/copyout.c:254: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).
  byte = strlen(ent.name);
data/hfsutils-3.2.6/copyout.c:497:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  path = malloc(strlen(dstname) + 1 + strlen(hint) + 1);
data/hfsutils-3.2.6/copyout.c:497: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).
	  path = malloc(strlen(dstname) + 1 + strlen(hint) + 1);
data/hfsutils-3.2.6/copyout.c:505:4:  [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(path, "/");
data/hfsutils-3.2.6/dlist.c:83:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(str) + 1;
data/hfsutils-3.2.6/dstring.c:52:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(str);
data/hfsutils-3.2.6/hattrib.c:76:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if (strlen(type) != 4)
data/hfsutils-3.2.6/hattrib.c:90:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if (strlen(crea) != 4)
data/hfsutils-3.2.6/hcd.c:78: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(root, ":");
data/hfsutils-3.2.6/hcopy.c:70:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  path += strlen(path);
data/hfsutils-3.2.6/hcopy.c:74:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strcasecmp(path - strlen(exts[i].ext), exts[i].ext) == 0)
data/hfsutils-3.2.6/hcwd.c:88: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).
  path = malloc(strlen(home) + 1 + sizeof(STATEFNAME));
data/hfsutils-3.2.6/hfsck/util.c:88:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(str, "+");
data/hfsutils-3.2.6/hfsutil.c:119:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = dot ? dot - bargv0 : strlen(bargv0);
data/hfsutils-3.2.6/hfsutil.c:296:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(name, ":");
data/hfsutils-3.2.6/hfsutil.c:298: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).
      namelen = strlen(name);
data/hfsutils-3.2.6/hfsutil.c:357:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      buf = malloc(strlen(cwd) + 1 + strlen(path) + 1);
data/hfsutils-3.2.6/hfsutil.c:357: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).
      buf = malloc(strlen(cwd) + 1 + strlen(path) + 1);
data/hfsutils-3.2.6/hfsutil.c:389:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      buf = realloc(cwd, strlen(cwd) + 1 + strlen(path) + 1);
data/hfsutils-3.2.6/hfsutil.c:389: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).
      buf = realloc(cwd, strlen(cwd) + 1 + strlen(path) + 1);
data/hfsutils-3.2.6/hfsutil.c:397:3:  [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(buf, "/");
data/hfsutils-3.2.6/hls.c:320:5:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		  sprintf(buf, "?");
data/hfsutils-3.2.6/hls.c:474:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len = strlen(strs[i]) + misc;
data/hfsutils-3.2.6/hls.c:500: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).
	  for (len = strlen(strs[i - rows]) + misc;
data/hfsutils-3.2.6/hls.c:523:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len = strlen(strs[i]) + misc;
data/hfsutils-3.2.6/hls.c:542: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).
	      for (len = strlen(strs[i - 1]) + misc;
data/hfsutils-3.2.6/hls.c:572:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len = strlen(strs[i]) + misclen(flags) + ((i < sz - 1) ? 2 : 0);
data/hfsutils-3.2.6/hls.c:742:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if (path[strlen(path) - 1] != ':' &&
data/hfsutils-3.2.6/hls.c:784: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).
	       path[strlen(path) - 1] == ':' ? "\n" : ":\n");
data/hfsutils-3.2.6/libhfs/data.c:389:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(src);
data/hfsutils-3.2.6/libhfs/hfs.c:57:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(name);
data/hfsutils-3.2.6/libhfs/low.c:125:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *) map->pmPartName, (const char *) ptr, 32);
data/hfsutils-3.2.6/libhfs/low.c:129:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *) map->pmParType, (const char *) ptr, 32);
data/hfsutils-3.2.6/libhfs/low.c:144:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *) map->pmProcessor, (const char *) ptr, 16);
data/hfsutils-3.2.6/libhfs/low.c:176:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *) ptr, (const char *) map->pmPartName, 32);
data/hfsutils-3.2.6/libhfs/low.c:180:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *) ptr, (const char *) map->pmParType, 32);
data/hfsutils-3.2.6/libhfs/low.c:195:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy((char *) ptr, (const char *) map->pmProcessor, 16);
data/hfsutils-3.2.6/libhfs/medium.c:109:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
  strcpy((char *) map.pmProcessor, "");
data/hfsutils-3.2.6/libhfs/medium.c:219:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(name) > 32 ||
data/hfsutils-3.2.6/libhfs/medium.c:220: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).
      strlen(type) > 32)
data/hfsutils-3.2.6/libhfs/os/unix.c:43:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ssize_t read(int, void *, size_t);
data/hfsutils-3.2.6/libhfs/os/unix.c:175:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  result = read(fd, buf, len << HFS_BLOCKSZ_BITS);
data/hfsutils-3.2.6/libhfs/record.c:409:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(name) + 1;
data/hfsutils-3.2.6/libhfs/volume.c:811:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(name, path, nptr - path);
data/hfsutils-3.2.6/librsrc/data.c:371:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(src);
data/hfsutils-3.2.6/librsrc/rsrc.c:60:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  nbytes = rfile->procs.read(rfile->priv, head, sizeof(head));
data/hfsutils-3.2.6/librsrc/rsrc.c:83:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  nbytes = rfile->procs.read(rfile->priv, rfile->map.data, rfile->hdr.mlen);
data/hfsutils-3.2.6/librsrc/rsrc.c:275:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  nbytes = rfile->procs.read(rfile->priv, data, sizeof(data));
data/hfsutils-3.2.6/librsrc/rsrc.c:298:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      nbytes = rfile->procs.read(rfile->priv, rsrc->data + count, len - count);
data/hfsutils-3.2.6/librsrc/rsrc.h:32:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  rsrcreadfunc	read;
data/hfsutils-3.2.6/strdup.c:37: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).
  ns = malloc(strlen(s) + 1);
data/hfsutils-3.2.6/tclhfs.c:403:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  bytes = hfs_write(file, argv[2], strlen(argv[2]));
data/hfsutils-3.2.6/tclhfs.c:1098:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (strlen(argv[3]) != 4 ||
data/hfsutils-3.2.6/tclhfs.c:1099: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).
	      strlen(argv[4]) != 4)

ANALYSIS SUMMARY:

Hits = 286
Lines analyzed = 20875 in approximately 0.58 seconds (36301 lines/second)
Physical Source Lines of Code (SLOC) = 12857
Hits@level = [0] 218 [1]  74 [2] 165 [3]   7 [4]  40 [5]   0
Hits@level+ = [0+] 504 [1+] 286 [2+] 212 [3+]  47 [4+]  40 [5+]   0
Hits/KSLOC@level+ = [0+] 39.2004 [1+] 22.2447 [2+] 16.4891 [3+] 3.6556 [4+] 3.11115 [5+]   0
Dot directories skipped = 4 (--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.