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/dpkg-1.20.5/dpkg-deb/build.c
Examining data/dpkg-1.20.5/dpkg-deb/dpkg-deb.h
Examining data/dpkg-1.20.5/dpkg-deb/extract.c
Examining data/dpkg-1.20.5/dpkg-deb/info.c
Examining data/dpkg-1.20.5/dpkg-deb/main.c
Examining data/dpkg-1.20.5/dpkg-split/dpkg-split.h
Examining data/dpkg-1.20.5/dpkg-split/info.c
Examining data/dpkg-1.20.5/dpkg-split/join.c
Examining data/dpkg-1.20.5/dpkg-split/main.c
Examining data/dpkg-1.20.5/dpkg-split/queue.c
Examining data/dpkg-1.20.5/dpkg-split/split.c
Examining data/dpkg-1.20.5/dselect/basecmds.cc
Examining data/dpkg-1.20.5/dselect/baselist.cc
Examining data/dpkg-1.20.5/dselect/basetop.cc
Examining data/dpkg-1.20.5/dselect/bindings.cc
Examining data/dpkg-1.20.5/dselect/bindings.h
Examining data/dpkg-1.20.5/dselect/curkeys.cc
Examining data/dpkg-1.20.5/dselect/cxx-support.cc
Examining data/dpkg-1.20.5/dselect/dselect-curses.h
Examining data/dpkg-1.20.5/dselect/dselect.h
Examining data/dpkg-1.20.5/dselect/helpmsgs.cc
Examining data/dpkg-1.20.5/dselect/helpmsgs.h
Examining data/dpkg-1.20.5/dselect/main.cc
Examining data/dpkg-1.20.5/dselect/methkeys.cc
Examining data/dpkg-1.20.5/dselect/methlist.cc
Examining data/dpkg-1.20.5/dselect/method.cc
Examining data/dpkg-1.20.5/dselect/method.h
Examining data/dpkg-1.20.5/dselect/methparse.cc
Examining data/dpkg-1.20.5/dselect/pkgcmds.cc
Examining data/dpkg-1.20.5/dselect/pkgdepcon.cc
Examining data/dpkg-1.20.5/dselect/pkgdisplay.cc
Examining data/dpkg-1.20.5/dselect/pkginfo.cc
Examining data/dpkg-1.20.5/dselect/pkgkeys.cc
Examining data/dpkg-1.20.5/dselect/pkglist.cc
Examining data/dpkg-1.20.5/dselect/pkglist.h
Examining data/dpkg-1.20.5/dselect/pkgsublist.cc
Examining data/dpkg-1.20.5/dselect/pkgtop.cc
Examining data/dpkg-1.20.5/lib/compat/alphasort.c
Examining data/dpkg-1.20.5/lib/compat/asprintf.c
Examining data/dpkg-1.20.5/lib/compat/compat.h
Examining data/dpkg-1.20.5/lib/compat/empty.c
Examining data/dpkg-1.20.5/lib/compat/getopt.c
Examining data/dpkg-1.20.5/lib/compat/getopt.h
Examining data/dpkg-1.20.5/lib/compat/getopt1.c
Examining data/dpkg-1.20.5/lib/compat/gettext.h
Examining data/dpkg-1.20.5/lib/compat/md5.c
Examining data/dpkg-1.20.5/lib/compat/md5.h
Examining data/dpkg-1.20.5/lib/compat/obstack.c
Examining data/dpkg-1.20.5/lib/compat/obstack.h
Examining data/dpkg-1.20.5/lib/compat/scandir.c
Examining data/dpkg-1.20.5/lib/compat/selinux.c
Examining data/dpkg-1.20.5/lib/compat/snprintf.c
Examining data/dpkg-1.20.5/lib/compat/strchrnul.c
Examining data/dpkg-1.20.5/lib/compat/strerror.c
Examining data/dpkg-1.20.5/lib/compat/strndup.c
Examining data/dpkg-1.20.5/lib/compat/strnlen.c
Examining data/dpkg-1.20.5/lib/compat/strsignal.c
Examining data/dpkg-1.20.5/lib/compat/unsetenv.c
Examining data/dpkg-1.20.5/lib/compat/vasprintf.c
Examining data/dpkg-1.20.5/lib/compat/vsnprintf.c
Examining data/dpkg-1.20.5/lib/dpkg/ar.c
Examining data/dpkg-1.20.5/lib/dpkg/ar.h
Examining data/dpkg-1.20.5/lib/dpkg/arch.c
Examining data/dpkg-1.20.5/lib/dpkg/arch.h
Examining data/dpkg-1.20.5/lib/dpkg/atomic-file.c
Examining data/dpkg-1.20.5/lib/dpkg/atomic-file.h
Examining data/dpkg-1.20.5/lib/dpkg/buffer.c
Examining data/dpkg-1.20.5/lib/dpkg/buffer.h
Examining data/dpkg-1.20.5/lib/dpkg/c-ctype.c
Examining data/dpkg-1.20.5/lib/dpkg/c-ctype.h
Examining data/dpkg-1.20.5/lib/dpkg/cleanup.c
Examining data/dpkg-1.20.5/lib/dpkg/color.c
Examining data/dpkg-1.20.5/lib/dpkg/color.h
Examining data/dpkg-1.20.5/lib/dpkg/command.c
Examining data/dpkg-1.20.5/lib/dpkg/command.h
Examining data/dpkg-1.20.5/lib/dpkg/compress.c
Examining data/dpkg-1.20.5/lib/dpkg/compress.h
Examining data/dpkg-1.20.5/lib/dpkg/db-ctrl-access.c
Examining data/dpkg-1.20.5/lib/dpkg/db-ctrl-format.c
Examining data/dpkg-1.20.5/lib/dpkg/db-ctrl-upgrade.c
Examining data/dpkg-1.20.5/lib/dpkg/db-ctrl.h
Examining data/dpkg-1.20.5/lib/dpkg/db-fsys-digest.c
Examining data/dpkg-1.20.5/lib/dpkg/db-fsys-divert.c
Examining data/dpkg-1.20.5/lib/dpkg/db-fsys-files.c
Examining data/dpkg-1.20.5/lib/dpkg/db-fsys-override.c
Examining data/dpkg-1.20.5/lib/dpkg/db-fsys.h
Examining data/dpkg-1.20.5/lib/dpkg/dbdir.c
Examining data/dpkg-1.20.5/lib/dpkg/dbmodify.c
Examining data/dpkg-1.20.5/lib/dpkg/deb-version.c
Examining data/dpkg-1.20.5/lib/dpkg/deb-version.h
Examining data/dpkg-1.20.5/lib/dpkg/debug.c
Examining data/dpkg-1.20.5/lib/dpkg/debug.h
Examining data/dpkg-1.20.5/lib/dpkg/depcon.c
Examining data/dpkg-1.20.5/lib/dpkg/dir.c
Examining data/dpkg-1.20.5/lib/dpkg/dir.h
Examining data/dpkg-1.20.5/lib/dpkg/dlist.h
Examining data/dpkg-1.20.5/lib/dpkg/dpkg-db.h
Examining data/dpkg-1.20.5/lib/dpkg/dpkg.h
Examining data/dpkg-1.20.5/lib/dpkg/dump.c
Examining data/dpkg-1.20.5/lib/dpkg/ehandle.c
Examining data/dpkg-1.20.5/lib/dpkg/ehandle.h
Examining data/dpkg-1.20.5/lib/dpkg/error.c
Examining data/dpkg-1.20.5/lib/dpkg/error.h
Examining data/dpkg-1.20.5/lib/dpkg/fdio.c
Examining data/dpkg-1.20.5/lib/dpkg/fdio.h
Examining data/dpkg-1.20.5/lib/dpkg/fields.c
Examining data/dpkg-1.20.5/lib/dpkg/file.c
Examining data/dpkg-1.20.5/lib/dpkg/file.h
Examining data/dpkg-1.20.5/lib/dpkg/fsys-dir.c
Examining data/dpkg-1.20.5/lib/dpkg/fsys-hash.c
Examining data/dpkg-1.20.5/lib/dpkg/fsys-iter.c
Examining data/dpkg-1.20.5/lib/dpkg/fsys.h
Examining data/dpkg-1.20.5/lib/dpkg/glob.c
Examining data/dpkg-1.20.5/lib/dpkg/glob.h
Examining data/dpkg-1.20.5/lib/dpkg/i18n.c
Examining data/dpkg-1.20.5/lib/dpkg/i18n.h
Examining data/dpkg-1.20.5/lib/dpkg/log.c
Examining data/dpkg-1.20.5/lib/dpkg/macros.h
Examining data/dpkg-1.20.5/lib/dpkg/mlib.c
Examining data/dpkg-1.20.5/lib/dpkg/namevalue.c
Examining data/dpkg-1.20.5/lib/dpkg/namevalue.h
Examining data/dpkg-1.20.5/lib/dpkg/nfmalloc.c
Examining data/dpkg-1.20.5/lib/dpkg/options-parsers.c
Examining data/dpkg-1.20.5/lib/dpkg/options.c
Examining data/dpkg-1.20.5/lib/dpkg/options.h
Examining data/dpkg-1.20.5/lib/dpkg/pager.c
Examining data/dpkg-1.20.5/lib/dpkg/pager.h
Examining data/dpkg-1.20.5/lib/dpkg/parse.c
Examining data/dpkg-1.20.5/lib/dpkg/parsedump.h
Examining data/dpkg-1.20.5/lib/dpkg/parsehelp.c
Examining data/dpkg-1.20.5/lib/dpkg/path-remove.c
Examining data/dpkg-1.20.5/lib/dpkg/path.c
Examining data/dpkg-1.20.5/lib/dpkg/path.h
Examining data/dpkg-1.20.5/lib/dpkg/perf.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-array.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-array.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-files.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-files.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-format.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-format.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-hash.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-list.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-list.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-namevalue.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-queue.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-queue.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-show.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-show.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg-spec.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg-spec.h
Examining data/dpkg-1.20.5/lib/dpkg/pkg.c
Examining data/dpkg-1.20.5/lib/dpkg/pkg.h
Examining data/dpkg-1.20.5/lib/dpkg/progname.c
Examining data/dpkg-1.20.5/lib/dpkg/progname.h
Examining data/dpkg-1.20.5/lib/dpkg/program.c
Examining data/dpkg-1.20.5/lib/dpkg/program.h
Examining data/dpkg-1.20.5/lib/dpkg/progress.c
Examining data/dpkg-1.20.5/lib/dpkg/progress.h
Examining data/dpkg-1.20.5/lib/dpkg/report.c
Examining data/dpkg-1.20.5/lib/dpkg/report.h
Examining data/dpkg-1.20.5/lib/dpkg/strhash.c
Examining data/dpkg-1.20.5/lib/dpkg/string.c
Examining data/dpkg-1.20.5/lib/dpkg/string.h
Examining data/dpkg-1.20.5/lib/dpkg/strwide.c
Examining data/dpkg-1.20.5/lib/dpkg/subproc.c
Examining data/dpkg-1.20.5/lib/dpkg/subproc.h
Examining data/dpkg-1.20.5/lib/dpkg/t/b-fsys-hash.c
Examining data/dpkg-1.20.5/lib/dpkg/t/b-pkg-hash.c
Examining data/dpkg-1.20.5/lib/dpkg/t/c-tarextract.c
Examining data/dpkg-1.20.5/lib/dpkg/t/c-treewalk.c
Examining data/dpkg-1.20.5/lib/dpkg/t/c-trigdeferred.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-ar.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-arch.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-c-ctype.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-command.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-deb-version.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-ehandle.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-error.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-file.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-fsys-dir.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-fsys-hash.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-headers-cpp.cc
Examining data/dpkg-1.20.5/lib/dpkg/t/t-macros.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-mod-db.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-namevalue.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-pager.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-path.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-pkg-hash.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-pkg-list.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-pkg-queue.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-pkg-show.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-pkginfo.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-progname.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-string.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-subproc.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-tar.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-test-skip.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-test.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-trigger.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-varbuf.c
Examining data/dpkg-1.20.5/lib/dpkg/t/t-version.c
Examining data/dpkg-1.20.5/lib/dpkg/tarfn.c
Examining data/dpkg-1.20.5/lib/dpkg/tarfn.h
Examining data/dpkg-1.20.5/lib/dpkg/test.h
Examining data/dpkg-1.20.5/lib/dpkg/treewalk.c
Examining data/dpkg-1.20.5/lib/dpkg/treewalk.h
Examining data/dpkg-1.20.5/lib/dpkg/trigdeferred.c
Examining data/dpkg-1.20.5/lib/dpkg/trigdeferred.h
Examining data/dpkg-1.20.5/lib/dpkg/triglib.c
Examining data/dpkg-1.20.5/lib/dpkg/triglib.h
Examining data/dpkg-1.20.5/lib/dpkg/trigname.c
Examining data/dpkg-1.20.5/lib/dpkg/trignote.c
Examining data/dpkg-1.20.5/lib/dpkg/utils.c
Examining data/dpkg-1.20.5/lib/dpkg/varbuf.c
Examining data/dpkg-1.20.5/lib/dpkg/varbuf.h
Examining data/dpkg-1.20.5/lib/dpkg/version.c
Examining data/dpkg-1.20.5/lib/dpkg/version.h
Examining data/dpkg-1.20.5/scripts/t/Dpkg_Shlibs/basictags.c
Examining data/dpkg-1.20.5/scripts/t/Dpkg_Shlibs/patterns.cpp
Examining data/dpkg-1.20.5/src/archives.c
Examining data/dpkg-1.20.5/src/archives.h
Examining data/dpkg-1.20.5/src/cleanup.c
Examining data/dpkg-1.20.5/src/configure.c
Examining data/dpkg-1.20.5/src/depcon.c
Examining data/dpkg-1.20.5/src/divertcmd.c
Examining data/dpkg-1.20.5/src/enquiry.c
Examining data/dpkg-1.20.5/src/errors.c
Examining data/dpkg-1.20.5/src/file-match.c
Examining data/dpkg-1.20.5/src/file-match.h
Examining data/dpkg-1.20.5/src/filters.c
Examining data/dpkg-1.20.5/src/filters.h
Examining data/dpkg-1.20.5/src/force.c
Examining data/dpkg-1.20.5/src/force.h
Examining data/dpkg-1.20.5/src/help.c
Examining data/dpkg-1.20.5/src/main.c
Examining data/dpkg-1.20.5/src/main.h
Examining data/dpkg-1.20.5/src/packages.c
Examining data/dpkg-1.20.5/src/perpkgstate.c
Examining data/dpkg-1.20.5/src/querycmd.c
Examining data/dpkg-1.20.5/src/remove.c
Examining data/dpkg-1.20.5/src/script.c
Examining data/dpkg-1.20.5/src/select.c
Examining data/dpkg-1.20.5/src/selinux.c
Examining data/dpkg-1.20.5/src/statcmd.c
Examining data/dpkg-1.20.5/src/trigcmd.c
Examining data/dpkg-1.20.5/src/trigproc.c
Examining data/dpkg-1.20.5/src/unpack.c
Examining data/dpkg-1.20.5/src/update.c
Examining data/dpkg-1.20.5/src/verify.c
Examining data/dpkg-1.20.5/utils/start-stop-daemon.c
Examining data/dpkg-1.20.5/utils/update-alternatives.c

FINAL RESULTS:

data/dpkg-1.20.5/lib/dpkg/file.c:56:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (chown(dst, stab.st_uid, stab.st_gid) == -1)
data/dpkg-1.20.5/lib/dpkg/file.c:60:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(dst, (stab.st_mode & ~S_IFMT)) == -1)
data/dpkg-1.20.5/lib/dpkg/path-remove.c:43:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		if (chmod(pathname, 0600))
data/dpkg-1.20.5/src/archives.c:515:10:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    rc = chown(path, st->uid, st->gid);
data/dpkg-1.20.5/src/archives.c:518:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    rc = chmod(path, st->mode & ~S_IFMT);
data/dpkg-1.20.5/src/archives.c:551:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    linksize = readlink(fn_old, linkname, stab->st_size + 1);
data/dpkg-1.20.5/src/archives.c:1040:11:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
      r = readlink(fnamevb.buf, symlinkfn.buf, symlinkfn.size);
data/dpkg-1.20.5/src/configure.c:742:8:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			r = readlink(result->buf, target.buf, target.size);
data/dpkg-1.20.5/src/script.c:88:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (!chmod(path, 0755))
data/dpkg-1.20.5/src/statcmd.c:187:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (chown(filename, filestat->uid, filestat->gid) < 0)
data/dpkg-1.20.5/src/statcmd.c:189:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(filename, filestat->mode & ~S_IFMT))
data/dpkg-1.20.5/utils/start-stop-daemon.c:579:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (chown(notify_sockdir, runas_uid, runas_gid))
data/dpkg-1.20.5/utils/start-stop-daemon.c:633:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rc = chmod(su.sun_path, 0660);
data/dpkg-1.20.5/utils/start-stop-daemon.c:637:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	rc = chown(su.sun_path, runas_uid, runas_gid);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1702:10:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	nread = readlink(lname, lcontents, sizeof(lcontents) - 1);
data/dpkg-1.20.5/utils/update-alternatives.c:379:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	size = readlink(linkname, buf, st.st_size);
data/dpkg-1.20.5/dpkg-deb/build.c:402: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(pathname, dir);
data/dpkg-1.20.5/dpkg-deb/build.c:404: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(pathname, DEBEXT);
data/dpkg-1.20.5/dpkg-deb/build.c:613:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(versionbuf, "%-8s\n%jd\n", OLDARCHIVEVERSION,
data/dpkg-1.20.5/dpkg-deb/build.c:624:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(adminmember, "%s%s", ADMINMEMBER,
data/dpkg-1.20.5/dpkg-deb/build.c:668:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(datamember, "%s%s", DATAMEMBER,
data/dpkg-1.20.5/dpkg-deb/extract.c:58:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf, "mv %s/* . && rmdir %s", thing, thing);
data/dpkg-1.20.5/dpkg-split/join.c:44:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(P_("Putting package %s together from %d part: ",
data/dpkg-1.20.5/dpkg-split/join.c:140: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(p,refi->package);
data/dpkg-1.20.5/dpkg-split/join.c:142: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(p,refi->version);
data/dpkg-1.20.5/dpkg-split/join.c:144: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(p, refi->arch ? refi->arch : "unknown");
data/dpkg-1.20.5/dpkg-split/join.c:145: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(p,DEBEXT);
data/dpkg-1.20.5/dpkg-split/queue.c:115:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(p, "%s/%s", opt_depotdir, de->d_name);
data/dpkg-1.20.5/dpkg-split/split.c:74:3:  [4] (shell) execlp:
  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.
		execlp(BACKEND, BACKEND, "--info", filename, "control", NULL);
data/dpkg-1.20.5/dpkg-split/split.c:175:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(P_("Splitting package %s into %d part: ",
data/dpkg-1.20.5/dselect/basecmds.cc:123: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(newsearchstring,searchstring);
data/dpkg-1.20.5/dselect/basecmds.cc:140: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(searchstring,newsearchstring);
data/dpkg-1.20.5/dselect/main.cc:165:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(gettext(programdesc), DSELECT, PACKAGE_RELEASE);
data/dpkg-1.20.5/dselect/method.cc:178: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(coption->meth->pathinmeth,exepath);
data/dpkg-1.20.5/dselect/method.cc:243: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(coption->meth->pathinmeth,METHODSETUPSCRIPT);
data/dpkg-1.20.5/dselect/methparse.cc:84: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(pathbuf,pathbase);
data/dpkg-1.20.5/dselect/methparse.cc:116:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pathmeth, dent->d_name);
data/dpkg-1.20.5/dselect/methparse.cc:121: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(pathinmeth,*ccpp);
data/dpkg-1.20.5/dselect/methparse.cc:122:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
      if (access(pathbuf,R_OK|X_OK))
data/dpkg-1.20.5/dselect/methparse.cc:127: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(pathinmeth,METHODOPTIONSFILE);
data/dpkg-1.20.5/dselect/methparse.cc:134: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(meth->name,dent->d_name);
data/dpkg-1.20.5/dselect/methparse.cc:164: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(opt->index,vb.string());
data/dpkg-1.20.5/dselect/methparse.cc:183: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(opt->name,vb.string());
data/dpkg-1.20.5/dselect/methparse.cc:198: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(opt->summary,vb.string());
data/dpkg-1.20.5/dselect/methparse.cc:200: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(pathinmeth,OPTIONSDESCPFX);
data/dpkg-1.20.5/dselect/methparse.cc:201: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(pathinmeth+sizeof(OPTIONSDESCPFX)-1,opt->name);
data/dpkg-1.20.5/dselect/methparse.cc:219: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(pathinmeth,METHODOPTIONSFILE);
data/dpkg-1.20.5/dselect/pkgtop.cc:81: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, ssostring ? gettext(ssostring) : _("All packages"));
data/dpkg-1.20.5/dselect/pkgtop.cc:85:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf,_("%s packages without a section"),gettext(ssoabbrev));
data/dpkg-1.20.5/dselect/pkgtop.cc:87:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf,_("%s packages in section %s"),gettext(ssoabbrev),section);
data/dpkg-1.20.5/dselect/pkgtop.cc:93:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buf,_("%s %s packages"),gettext(ssoabbrev),prioritystring);
data/dpkg-1.20.5/dselect/pkgtop.cc:97:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf,_("%s %s packages without a section"),gettext(ssoabbrev),prioritystring);
data/dpkg-1.20.5/dselect/pkgtop.cc:99:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf,_("%s %s packages in section %s"),gettext(ssoabbrev),prioritystring,section);
data/dpkg-1.20.5/dselect/pkgtop.cc:119:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf,
data/dpkg-1.20.5/lib/compat/compat.h:51:56:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define LIBCOMPAT_ATTR_PRINTF(n)	__attribute__((format(printf, n, n + 1)))
data/dpkg-1.20.5/lib/compat/compat.h:52:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define LIBCOMPAT_ATTR_VPRINTF(n)	__attribute__((format(printf, n, 0)))
data/dpkg-1.20.5/lib/compat/compat.h:104:8:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#undef snprintf
data/dpkg-1.20.5/lib/compat/compat.h:105:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf test_snprintf
data/dpkg-1.20.5/lib/compat/compat.h:106:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#undef vsnprintf
data/dpkg-1.20.5/lib/compat/compat.h:107:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf test_vsnprintf
data/dpkg-1.20.5/lib/compat/compat.h:131:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf(char *str, size_t n, char const *fmt, ...)
data/dpkg-1.20.5/lib/compat/compat.h:133:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
data/dpkg-1.20.5/lib/compat/scandir.c:85: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(m->d_name, e->d_name);
data/dpkg-1.20.5/lib/compat/snprintf.c:29:1:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
snprintf(char *str, size_t n, char const *fmt, ...)
data/dpkg-1.20.5/lib/compat/snprintf.c:35:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	i = vsnprintf(str, n, fmt, args);
data/dpkg-1.20.5/lib/compat/unsetenv.c:36: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(q, p);
data/dpkg-1.20.5/lib/compat/vasprintf.c:36:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	needed = vsnprintf(NULL, 0, fmt, args_copy);
data/dpkg-1.20.5/lib/compat/vasprintf.c:50:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	n = vsnprintf(str, needed + 1, fmt, args);
data/dpkg-1.20.5/lib/compat/vsnprintf.c:32:1:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
data/dpkg-1.20.5/lib/compat/vsnprintf.c:61:10:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	total = vfprintf(file, fmt, args);
data/dpkg-1.20.5/lib/dpkg/command.c:181:2:  [4] (shell) execvp:
  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.
	execvp(cmd->filename, (char * const *)cmd->argv);
data/dpkg-1.20.5/lib/dpkg/command.c:209:2:  [4] (shell) execlp:
  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.
	execlp(shell, shell, mode, cmd, NULL);
data/dpkg-1.20.5/lib/dpkg/db-fsys-files.c:282:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(P_("%d file or directory currently installed.)\n",
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:101: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(updatefnrest, cdlist[i]->d_name);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:109:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(updatefnrest, cdlist[i]->d_name);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:173: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(updatefnbuf, updatesdir);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:298:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    db_can_access = access(dpkg_db_get_dir(), W_OK) == 0;
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:366:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(updatefnrest, IMPORTANTFMT, i);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:429:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(updatefnrest, IMPORTANTFMT, nextupdate);
data/dpkg-1.20.5/lib/dpkg/debug.c:87:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(debug_output, fmt, args);
data/dpkg-1.20.5/lib/dpkg/ehandle.c:205:10:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    rc = vsnprintf(emergency.errmsg, sizeof(emergency.errmsg), fmt, args);
data/dpkg-1.20.5/lib/dpkg/fields.c:294:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(newversion, "%s-%s", pkgbin->version.version,
data/dpkg-1.20.5/lib/dpkg/fsys-hash.c:113: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(newname + 1, name);
data/dpkg-1.20.5/lib/dpkg/macros.h:48:51:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DPKG_ATTR_PRINTF(n)	__attribute__((format(printf, n, n + 1)))
data/dpkg-1.20.5/lib/dpkg/macros.h:49:52:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DPKG_ATTR_VPRINTF(n)	__attribute__((format(printf, n, 0)))
data/dpkg-1.20.5/lib/dpkg/path-remove.c:143:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access(pathname, F_OK) < 0 && errno == ENOENT)
data/dpkg-1.20.5/lib/dpkg/path-remove.c:152:3:  [4] (shell) execlp:
  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.
		execlp(RM, "rm", "-rf", "--", pathname, NULL);
data/dpkg-1.20.5/lib/dpkg/trigdeferred.c:158:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(trig_new_deferred, format, ap);
data/dpkg-1.20.5/lib/dpkg/varbuf.c:78:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  needed = vsnprintf(NULL, 0, fmt, args_copy);
data/dpkg-1.20.5/lib/dpkg/varbuf.c:86:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  r = vsnprintf(v->buf + v->used, needed + 1, fmt, args);
data/dpkg-1.20.5/src/archives.c:244: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(oldhash, conff->hash);
data/dpkg-1.20.5/src/archives.c:961: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(oldhash, EMPTYHASHFLAG);
data/dpkg-1.20.5/src/configure.c:109: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(stderr, !useredited ?
data/dpkg-1.20.5/src/configure.c:115: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(stderr, distedited ?
data/dpkg-1.20.5/src/configure.c:404: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(cdr2rest, DPKGNEWEXT);
data/dpkg-1.20.5/src/configure.c:475: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(cdr2rest, DPKGOLDEXT);
data/dpkg-1.20.5/src/configure.c:483: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(cdr2rest, DPKGNEWEXT);
data/dpkg-1.20.5/src/configure.c:491: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(cdr2rest, DPKGNEWEXT);
data/dpkg-1.20.5/src/configure.c:498: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(cdr2rest, DPKGDISTEXT);
data/dpkg-1.20.5/src/configure.c:503: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(cdr2rest, DPKGOLDEXT);
data/dpkg-1.20.5/src/configure.c:519: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(cdr2rest, DPKGNEWEXT);
data/dpkg-1.20.5/src/configure.c:823: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(hashbuf, NONEXISTENTFLAG);
data/dpkg-1.20.5/src/configure.c:827: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(hashbuf, EMPTYHASHFLAG);
data/dpkg-1.20.5/src/depcon.c:463:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(linebuf, _("  %.250s is %s.\n"),
data/dpkg-1.20.5/src/depcon.c:519:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(linebuf, _("  %.250s provides %.250s but is %s.\n"),
data/dpkg-1.20.5/src/depcon.c:598:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(linebuf, _("  %.250s (version %.250s) is present and %s.\n"),
data/dpkg-1.20.5/src/depcon.c:679:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(linebuf,
data/dpkg-1.20.5/src/enquiry.c:342:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(P_(" %d package, from the following section:",
data/dpkg-1.20.5/src/main.c:306: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(copy,value);
data/dpkg-1.20.5/src/main.c:402:14:  [4] (shell) system:
  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.
    status = system(hook->command);
data/dpkg-1.20.5/src/script.c:299: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(cidirrest, scriptname);
data/dpkg-1.20.5/src/script.c:371: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(cidirrest, scriptname);
data/dpkg-1.20.5/src/unpack.c:75:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(pfilenamebuf, _(".../%s"), pfilename);
data/dpkg-1.20.5/src/unpack.c:101:5:  [4] (shell) execlp:
  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.
    execlp(SPLITTER, SPLITTER, "-Qao", reasmbuf, *filename, NULL);
data/dpkg-1.20.5/src/unpack.c:142:5:  [4] (shell) execlp:
  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.
    execlp(DEBSIGVERIFY, DEBSIGVERIFY, "-q", filename, NULL);
data/dpkg-1.20.5/src/unpack.c:173: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(cidir, tmpdir);
data/dpkg-1.20.5/src/unpack.c:188: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(cidir, admindir);
data/dpkg-1.20.5/src/unpack.c:189: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(cidir, "/" CONTROLDIRTMP);
data/dpkg-1.20.5/src/unpack.c:478: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(cidirrest, match_node->filetype);
data/dpkg-1.20.5/src/unpack.c:515: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(cidirrest, de->d_name);
data/dpkg-1.20.5/src/unpack.c:1124:5:  [4] (shell) execlp:
  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.
    execlp(BACKEND, BACKEND, "--control", filename, cidir, NULL);
data/dpkg-1.20.5/src/unpack.c:1137: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(cidirrest,CONTROLFILE);
data/dpkg-1.20.5/src/unpack.c:1224: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(cidirrest, TRIGGERSCIFILE);
data/dpkg-1.20.5/src/unpack.c:1231: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(cidirrest,CONFFILESFILE);
data/dpkg-1.20.5/src/unpack.c:1425:5:  [4] (shell) execlp:
  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.
    execlp(BACKEND, BACKEND, "--fsys-tarfile", filename, NULL);
data/dpkg-1.20.5/src/unpack.c:1496: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(cidirrest, TRIGGERSCIFILE);
data/dpkg-1.20.5/src/update.c:64:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(dbdir, W_OK)) {
data/dpkg-1.20.5/src/update.c:106:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(P_("Information about %d package was updated.\n",
data/dpkg-1.20.5/utils/start-stop-daemon.c:298:2:  [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(format, arglist);
data/dpkg-1.20.5/utils/start-stop-daemon.c:311:2:  [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(format, arglist);
data/dpkg-1.20.5/utils/start-stop-daemon.c:322:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, arglist);
data/dpkg-1.20.5/utils/start-stop-daemon.c:333:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args_copy);
data/dpkg-1.20.5/utils/start-stop-daemon.c:374:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, arglist);
data/dpkg-1.20.5/utils/start-stop-daemon.c:563:23:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (getuid() == 0 && access("/run", F_OK) == 0) {
data/dpkg-1.20.5/utils/start-stop-daemon.c:2630:2:  [4] (shell) execv:
  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.
	execv(startas, argv);
data/dpkg-1.20.5/utils/update-alternatives.c:188:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:201:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:214:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:233:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:248:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:263:2:  [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(fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:278:2:  [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(fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:289:2:  [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(fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:403:3:  [4] (shell) execvp:
  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.
		execvp(prog, (char *const *)args);
data/dpkg-1.20.5/utils/update-alternatives.c:528:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(fh_log, fmt, args);
data/dpkg-1.20.5/utils/update-alternatives.c:2333: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(string + cur_len, argv[i]);
data/dpkg-1.20.5/dpkg-deb/build.c:556: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.
  timestamp_str = getenv("SOURCE_DATE_EPOCH");
data/dpkg-1.20.5/dpkg-split/split.c:163:18:  [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.
	timestamp_str = getenv("SOURCE_DATE_EPOCH");
data/dpkg-1.20.5/lib/compat/getopt.c:210:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
char *getenv ();
data/dpkg-1.20.5/lib/compat/getopt.c:400:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/dpkg-1.20.5/lib/compat/getopt.c:968:1:  [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.
getopt (argc, argv, optstring)
data/dpkg-1.20.5/lib/compat/getopt.c:998:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/dpkg-1.20.5/lib/compat/getopt.h:108: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.
extern int getopt (int argc, char *const *argv, const char *shortopts);
data/dpkg-1.20.5/lib/compat/getopt.h:112:12:  [3] (buffer) getopt_long:
  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.
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/dpkg-1.20.5/lib/compat/getopt.h:124: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.
extern int getopt ();
data/dpkg-1.20.5/lib/compat/getopt.h:125:12:  [3] (buffer) getopt_long:
  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.
extern int getopt_long ();
data/dpkg-1.20.5/lib/compat/getopt1.c:70:1:  [3] (buffer) getopt_long:
  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.
getopt_long (argc, argv, options, long_options, opt_index)
data/dpkg-1.20.5/lib/compat/getopt1.c:126:11:  [3] (buffer) getopt_long:
  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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/dpkg-1.20.5/lib/dpkg/color.c:60: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.
	mode = getenv("DPKG_COLORS");
data/dpkg-1.20.5/lib/dpkg/command.c:200: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.
		shell = getenv("SHELL");
data/dpkg-1.20.5/lib/dpkg/dbdir.c:51: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.
		env = getenv("DPKG_ADMINDIR");
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:230:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("DPKG_FRONTEND_LOCKED") == NULL) {
data/dpkg-1.20.5/lib/dpkg/fsys-dir.c:53: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.
		env = getenv("DPKG_ROOT");
data/dpkg-1.20.5/lib/dpkg/options.c:207: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/dpkg-1.20.5/lib/dpkg/pager.c:60: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.
	pager = getenv("DPKG_PAGER");
data/dpkg-1.20.5/lib/dpkg/pager.c:62: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.
		pager = getenv("PAGER");
data/dpkg-1.20.5/lib/dpkg/path.c:107: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.
	tmpdir = getenv("TMPDIR");
data/dpkg-1.20.5/lib/dpkg/t/c-treewalk.c:96:26:  [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.
	const char *visitname = getenv("TREEWALK_VISIT");
data/dpkg-1.20.5/lib/dpkg/t/c-treewalk.c:108:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	skipname = getenv("TREEWALK_SKIP");
data/dpkg-1.20.5/lib/dpkg/test.h:66:23:  [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.
	const char *envdir = getenv(envvar);
data/dpkg-1.20.5/src/divertcmd.c:576:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	archname = getenv("DPKG_MAINTSCRIPT_ARCH");
data/dpkg-1.20.5/src/divertcmd.c:842: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.
	env_pkgname = getenv("DPKG_MAINTSCRIPT_PACKAGE");
data/dpkg-1.20.5/src/force.c:357:14:  [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.
	force_env = getenv("DPKG_FORCE");
data/dpkg-1.20.5/src/help.c:86: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.
  path_list = getenv("PATH");
data/dpkg-1.20.5/src/script.c:118:8:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		rc = chroot(instdir);
data/dpkg-1.20.5/src/trigcmd.c:120:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		pkgname = getenv("DPKG_MAINTSCRIPT_PACKAGE");
data/dpkg-1.20.5/src/trigcmd.c:121:14:  [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.
		archname = getenv("DPKG_MAINTSCRIPT_ARCH");
data/dpkg-1.20.5/utils/start-stop-daemon.c:566:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		basedir = getenv("TMPDIR");
data/dpkg-1.20.5/utils/start-stop-daemon.c:1302:7:  [3] (buffer) getopt_long:
  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.
		c = getopt_long(argc, argv,
data/dpkg-1.20.5/utils/start-stop-daemon.c:2592:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (chroot(changeroot) < 0)
data/dpkg-1.20.5/utils/update-alternatives.c:550: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.
		instdir_env = getenv(INSTDIR_ENVVAR);
data/dpkg-1.20.5/utils/update-alternatives.c:2810: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.
	basedir_env = getenv(ADMINDIR_ENVVAR);
data/dpkg-1.20.5/dpkg-deb/build.c:254: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 conffilename[MAXCONFFILENAME + 1];
data/dpkg-1.20.5/dpkg-deb/build.c:260: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).
  cf = fopen(controlfile.buf, "r");
data/dpkg-1.20.5/dpkg-deb/build.c:448: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 mtime[50];
data/dpkg-1.20.5/dpkg-deb/build.c:573:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  gzfd = mkstemp(tfbuf);
data/dpkg-1.20.5/dpkg-deb/build.c:609: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 versionbuf[40];
data/dpkg-1.20.5/dpkg-deb/build.c:622: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 adminmember[16 + 1];
data/dpkg-1.20.5/dpkg-deb/build.c:646:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    gzfd = mkstemp(tfbuf);
data/dpkg-1.20.5/dpkg-deb/build.c:666: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 datamember[16 + 1];
data/dpkg-1.20.5/dpkg-deb/extract.c: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 buf[200];
data/dpkg-1.20.5/dpkg-deb/extract.c:111: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 versionbuf[40];
data/dpkg-1.20.5/dpkg-deb/extract.c:232: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 ctrllenbuf[40];
data/dpkg-1.20.5/dpkg-deb/info.c:95: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(controlfile.buf, O_RDONLY);
data/dpkg-1.20.5/dpkg-deb/info.c:120: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 interpreter[INTERPRETER_MAX+1], *p;
data/dpkg-1.20.5/dpkg-deb/info.c: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).
      cc = fopen(controlfile.buf, "r");
data/dpkg-1.20.5/dpkg-deb/info.c:175: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).
  cc = fopen(controlfile.buf, "r");
data/dpkg-1.20.5/dpkg-split/info.c:94: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 magicbuf[sizeof(DPKG_AR_MAGIC) - 1], *rip, *partnums, *slash;
data/dpkg-1.20.5/dpkg-split/join.c:55:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd_in = open(pi->filename, O_RDONLY);
data/dpkg-1.20.5/dpkg-split/queue.c:202: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_src = open(partfile, O_RDONLY);
data/dpkg-1.20.5/dpkg-split/split.c:138:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hash[MD5HASHLEN + 1];
data/dpkg-1.20.5/dpkg-split/split.c:147:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd_src = open(file_src, O_RDONLY);
data/dpkg-1.20.5/dselect/basecmds.cc: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 newsearchstring[128];
data/dpkg-1.20.5/dselect/bindings.cc:81: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 buf[50];
data/dpkg-1.20.5/dselect/bindings.cc:82: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,_("[unk: %d]"),b->key);
data/dpkg-1.20.5/dselect/bindings.cc:107:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 **retarray= new const char *[count+2];
data/dpkg-1.20.5/dselect/dselect.h:111: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 searchstring[128];
data/dpkg-1.20.5/dselect/main.cc:231: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(v, "a");
data/dpkg-1.20.5/dselect/main.cc:472: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 buf[2]; buf[0]=c; buf[1]=0; c=atoi(buf);
data/dpkg-1.20.5/dselect/main.cc:472:42:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      char buf[2]; buf[0]=c; buf[1]=0; c=atoi(buf);
data/dpkg-1.20.5/dselect/method.cc:109:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    methlockfd= open(methodlockfile, O_RDWR|O_CREAT|O_TRUNC, 0660);
data/dpkg-1.20.5/dselect/method.h: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 index[OPTIONINDEXMAXLEN];
data/dpkg-1.20.5/dselect/methparse.cc:128: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).
    names= fopen(pathbuf,"r");
data/dpkg-1.20.5/dselect/methparse.cc:202: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).
      descfile= fopen(pathbuf,"r");
data/dpkg-1.20.5/dselect/methparse.cc:250: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 methoptbuf[IMETHODMAXLEN+1+IOPTIONMAXLEN+2];
data/dpkg-1.20.5/dselect/methparse.cc:259: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).
  cmo= fopen(methoptfile,"r");
data/dpkg-1.20.5/dselect/pkglist.cc:122: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(newtable, table, nallocated * sizeof(struct perpackagestate *));
data/dpkg-1.20.5/lib/compat/compat.h:100:28:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))
data/dpkg-1.20.5/lib/compat/getopt.c:328: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 (new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
data/dpkg-1.20.5/lib/compat/getopt.c:440: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 (__getopt_nonoption_flags, orig_str, len);
data/dpkg-1.20.5/lib/compat/gettext.h:203: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/dpkg-1.20.5/lib/compat/gettext.h:205: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/dpkg-1.20.5/lib/compat/gettext.h:213: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/dpkg-1.20.5/lib/compat/gettext.h:215: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/dpkg-1.20.5/lib/compat/gettext.h:249: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/dpkg-1.20.5/lib/compat/gettext.h:251: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/dpkg-1.20.5/lib/compat/gettext.h:259: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/dpkg-1.20.5/lib/compat/gettext.h:261: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/dpkg-1.20.5/lib/compat/md5.c:82: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(ctx->buffer + have, input, need);
data/dpkg-1.20.5/lib/compat/md5.c:99: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(ctx->buffer + have, input, len);
data/dpkg-1.20.5/lib/compat/md5.c:128: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.
MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
data/dpkg-1.20.5/lib/compat/obstack.h:147: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	contents[4];		/* objects begin here */
data/dpkg-1.20.5/lib/compat/obstack.h:302: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 (__o->next_free, where, __len);				\
data/dpkg-1.20.5/lib/compat/obstack.h:312: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 (__o->next_free, where, __len);				\
data/dpkg-1.20.5/lib/compat/obstack.h:438: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 ((h)->next_free, where, (h)->temp.tempint),			\
data/dpkg-1.20.5/lib/compat/obstack.h:445: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 ((h)->next_free, where, (h)->temp.tempint),			\
data/dpkg-1.20.5/lib/compat/strerror.c:40: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.
	static char buf[100];
data/dpkg-1.20.5/lib/compat/strerror.c:45: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, _("Unknown error %d"), e);
data/dpkg-1.20.5/lib/compat/strndup.c:38: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(str, s, len);
data/dpkg-1.20.5/lib/compat/strsignal.c:68: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.
	static char buf[100];
data/dpkg-1.20.5/lib/compat/strsignal.c:73: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, _("Unknown signal %d"), s);
data/dpkg-1.20.5/lib/compat/vsnprintf.c:50:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		file = tmpfile();
data/dpkg-1.20.5/lib/dpkg/ar.c:67: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(filename, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/ar.c:168:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char header[sizeof(struct dpkg_ar_hdr) + 1];
data/dpkg-1.20.5/lib/dpkg/ar.h:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ar_name[16];	   /* Member file name, sometimes / terminated. */
data/dpkg-1.20.5/lib/dpkg/ar.h:47:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ar_date[12];	   /* File date, decimal seconds since Epoch.  */
data/dpkg-1.20.5/lib/dpkg/ar.h:48:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ar_uid[6], ar_gid[6]; /* User and group IDs, in ASCII decimal.  */
data/dpkg-1.20.5/lib/dpkg/ar.h:49:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ar_mode[8];	   /* File mode, in ASCII octal.  */
data/dpkg-1.20.5/lib/dpkg/ar.h:50:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ar_size[10];	   /* File size, in ASCII decimal.  */
data/dpkg-1.20.5/lib/dpkg/ar.h:51:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ar_fmag[2];
data/dpkg-1.20.5/lib/dpkg/arch.c:58: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.
	static char buf[150];
data/dpkg-1.20.5/lib/dpkg/arch.c:289:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char archname[_POSIX2_LINE_MAX];
data/dpkg-1.20.5/lib/dpkg/arch.c:292: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(archfile, "r");
data/dpkg-1.20.5/lib/dpkg/atomic-file.c:56: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(file->name_new, "w");
data/dpkg-1.20.5/lib/dpkg/atomic-file.c:62: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).
		file->fp = fopen(file->name_new, "w");
data/dpkg-1.20.5/lib/dpkg/buffer.c:92:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char digest[16], *p = digest;
data/dpkg-1.20.5/lib/dpkg/buffer.c:100: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(hash, "%02x", *p++);
data/dpkg-1.20.5/lib/dpkg/compress.c:152:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[DPKG_BUFFER_SIZE];
data/dpkg-1.20.5/lib/dpkg/compress.c:197:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[DPKG_BUFFER_SIZE];
data/dpkg-1.20.5/lib/dpkg/compress.c:198:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char combuf[6];
data/dpkg-1.20.5/lib/dpkg/compress.c:262:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char combuf[6];
data/dpkg-1.20.5/lib/dpkg/compress.c:296:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[DPKG_BUFFER_SIZE];
data/dpkg-1.20.5/lib/dpkg/compress.c:332:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[DPKG_BUFFER_SIZE];
data/dpkg-1.20.5/lib/dpkg/compress.c:333:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char combuf[6];
data/dpkg-1.20.5/lib/dpkg/compress.c:390:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char combuf[6];
data/dpkg-1.20.5/lib/dpkg/compress.c:654:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char combuf[6];
data/dpkg-1.20.5/lib/dpkg/compress.c:750:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char combuf[6];
data/dpkg-1.20.5/lib/dpkg/db-ctrl-format.c:47: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(file, "r");
data/dpkg-1.20.5/lib/dpkg/db-fsys-divert.c:50:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char linebuf[MAXDIVERTFILENAME];
data/dpkg-1.20.5/lib/dpkg/db-fsys-divert.c:60:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen(diversionsname, "r");
data/dpkg-1.20.5/lib/dpkg/db-fsys-files.c:203: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(listfile, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/db-fsys-files.c:236: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(listfile, O_RDONLY | O_NONBLOCK);
data/dpkg-1.20.5/lib/dpkg/db-fsys-override.c:128:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen(statoverridename, "r");
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:130: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).
  importanttmp= fopen(importanttmpfile,"w");
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:206: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).
    lockfd = open(lockfile, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:231:22:  [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).
    frontendlockfd = open(frontendlockfile, O_RDWR | O_CREAT | O_TRUNC, 0660);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:243: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).
  dblockfd = open(lockfile, O_RDWR | O_CREAT | O_TRUNC, 0660);
data/dpkg-1.20.5/lib/dpkg/dir.c:170:7:  [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, O_WRONLY);
data/dpkg-1.20.5/lib/dpkg/dump.c:499: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 writebuf[8192];
data/dpkg-1.20.5/lib/dpkg/ehandle.c:101: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 errmsg[4096];
data/dpkg-1.20.5/lib/dpkg/fields.c:382: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(newptr+1,value,namelen);
data/dpkg-1.20.5/lib/dpkg/fields.c:386: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(newptr, hashstart, hashlen);
data/dpkg-1.20.5/lib/dpkg/file.c:96:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(filename, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/file.c:224:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(filename, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/log.c:45:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char time_str[20];
data/dpkg-1.20.5/lib/dpkg/log.c:53:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		logfd = open(log_file, O_WRONLY | O_CREAT | O_APPEND, 0644);
data/dpkg-1.20.5/lib/dpkg/options.c:72: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 linebuf[MAX_CONFIG_LINE];
data/dpkg-1.20.5/lib/dpkg/options.c:74:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file= fopen(fn, "r");
data/dpkg-1.20.5/lib/dpkg/parse.c:476:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(dst_pkgbin, src_pkgbin, sizeof(struct pkgbin));
data/dpkg-1.20.5/lib/dpkg/parse.c:559: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(filename, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/parsehelp.c:127: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 buf[150];
data/dpkg-1.20.5/lib/dpkg/path.c:160: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(dst, "\\%03o",
data/dpkg-1.20.5/lib/dpkg/pkg-format.c:107: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(node->data, fmt, len);
data/dpkg-1.20.5/lib/dpkg/pkg-spec.c:65: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.
	static char msg[1024];
data/dpkg-1.20.5/lib/dpkg/string.c:41:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst, src, len);
data/dpkg-1.20.5/lib/dpkg/t/c-tarextract.c:129:20:  [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).
		tar_ctx.tar_fd = open(tar_name, O_RDONLY);
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:42:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hash[MD5HASHLEN + 1];
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:54:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hash[MD5HASHLEN + 1];
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:59:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(test_file);
data/dpkg-1.20.5/lib/dpkg/t/t-ehandle.c:118:7:  [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("/dev/null", O_RDWR);
data/dpkg-1.20.5/lib/dpkg/t/t-file.c:68:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(test_file);
data/dpkg-1.20.5/lib/dpkg/t/t-pager.c:40: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).
	newfd = open(filename, flags);
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:82:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024], *str;
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:127:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024], *q;
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:131:2:  [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(q, " end");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:136:2:  [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(q, " end");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:141:2:  [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(q, " end");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:146:2:  [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(q, " end");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:162:2:  [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(q, " end");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:167:2:  [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(q, " end");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:192:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024], *str;
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:194:2:  [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(buf, "unquoted text");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:198:2:  [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(buf, "contained 'quoted text'");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:202:2:  [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(buf, "contained \"quoted text\"");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:206:2:  [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(buf, "'unbalanced quotes");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:210:2:  [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(buf, "\"unbalanced quotes");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:214:2:  [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(buf, "'mismatched quotes\"");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:218:2:  [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(buf, "\"mismatched quotes'");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:222:2:  [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(buf, "'completely quoted text'");
data/dpkg-1.20.5/lib/dpkg/t/t-string.c:226:2:  [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(buf, "\"completely quoted text\"");
data/dpkg-1.20.5/lib/dpkg/t/t-subproc.c:94:7:  [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("/dev/null", O_RDWR);
data/dpkg-1.20.5/lib/dpkg/tarfn.c:65:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[100];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:66:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mode[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:67:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uid[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:68:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char gid[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:69:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char size[12];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:70:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mtime[12];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:71:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char checksum[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:73:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char linkname[100];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char magic[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:77:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char user[32];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:78:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char group[32];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:79:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char devmajor[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:80:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char devminor[8];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:83:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char prefix[155];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:356:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[TARBLKSZ];
data/dpkg-1.20.5/lib/dpkg/tarfn.c:383: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(bp, buf, copysize);
data/dpkg-1.20.5/lib/dpkg/tarfn.c:393: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(dst, src, sizeof(struct tar_entry));
data/dpkg-1.20.5/lib/dpkg/tarfn.c:447:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[TARBLKSZ];
data/dpkg-1.20.5/lib/dpkg/trigdeferred.c:82: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).
			lock_fd = open(fn.buf, O_RDWR | O_CREAT | O_TRUNC, 0600);
data/dpkg-1.20.5/lib/dpkg/trigdeferred.c:100: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).
	old_deferred = fopen(fn.buf, "r");
data/dpkg-1.20.5/lib/dpkg/trigdeferred.c:132:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		trig_new_deferred = fopen(newfn.buf, "w");
data/dpkg-1.20.5/lib/dpkg/trigdeferred.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[_POSIX2_LINE_MAX];
data/dpkg-1.20.5/lib/dpkg/triglib.c:264: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).
	trk_explicit_f = fopen(trk_explicit_fn.buf, "r");
data/dpkg-1.20.5/lib/dpkg/triglib.c:288:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/dpkg-1.20.5/lib/dpkg/triglib.c:328:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/dpkg-1.20.5/lib/dpkg/triglib.c:495:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char linebuf[1024], *space;
data/dpkg-1.20.5/lib/dpkg/triglib.c:502: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).
	f = fopen(triggersfilefile, "r");
data/dpkg-1.20.5/lib/dpkg/triglib.c:688:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char linebuf[MAXTRIGDIRECTIVE], *cmd, *spc, *eol;
data/dpkg-1.20.5/lib/dpkg/triglib.c:691: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).
	f = fopen(file, "r");
data/dpkg-1.20.5/lib/dpkg/varbuf.c:99: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(v->buf + v->used, s, size);
data/dpkg-1.20.5/src/archives.c:300: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 fnamebuf[256];
data/dpkg-1.20.5/src/archives.c:355: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 fnamebuf[256];
data/dpkg-1.20.5/src/archives.c:356: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 fnamenewbuf[256];
data/dpkg-1.20.5/src/archives.c:364: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(path, O_CREAT | O_EXCL | O_WRONLY, 0);
data/dpkg-1.20.5/src/archives.c:461: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 fnamebuf[256];
data/dpkg-1.20.5/src/archives.c:676: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 oldhash[MD5HASHLEN + 1];
data/dpkg-1.20.5/src/archives.c:1112: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(fnamenewvb.buf, O_WRONLY);
data/dpkg-1.20.5/src/archives.c:1153: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(fnamenewvb.buf, O_WRONLY);
data/dpkg-1.20.5/src/archives.c:1274: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 action[512];
data/dpkg-1.20.5/src/archives.c:1275: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(action, _("removal of %.250s"), pkg_name(fixbyrm, pnaw_nonambig));
data/dpkg-1.20.5/src/archives.c:1295: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 action[512];
data/dpkg-1.20.5/src/archives.c:1304: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(action, _("installation of %.250s"),
data/dpkg-1.20.5/src/configure.c:378:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char currenthash[MD5HASHLEN + 1], newdisthash[MD5HASHLEN + 1];
data/dpkg-1.20.5/src/configure.c:813:7:  [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(fn, O_RDONLY);
data/dpkg-1.20.5/src/depcon.c:320: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 linebuf[1024];
data/dpkg-1.20.5/src/depcon.c:392: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.
          sprintf(linebuf, _("  %.250s is to be removed.\n"),
data/dpkg-1.20.5/src/depcon.c:396: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.
          sprintf(linebuf, _("  %.250s is to be deconfigured.\n"),
data/dpkg-1.20.5/src/depcon.c:404: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.
          sprintf(linebuf, _("  %.250s is to be installed, but is version "
data/dpkg-1.20.5/src/depcon.c:418:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(linebuf, _("  %.250s is installed, but is version "
data/dpkg-1.20.5/src/depcon.c:437:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(linebuf, _("  %.250s is unpacked, but has never been "
data/dpkg-1.20.5/src/depcon.c:442:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(linebuf, _("  %.250s is unpacked, but is version "
data/dpkg-1.20.5/src/depcon.c:451:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(linebuf, _("  %.250s latest configured version is "
data/dpkg-1.20.5/src/depcon.c:503:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(linebuf, _("  %.250s provides %.250s but is to be removed.\n"),
data/dpkg-1.20.5/src/depcon.c:508:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(linebuf, _("  %.250s provides %.250s but is to be deconfigured.\n"),
data/dpkg-1.20.5/src/depcon.c:534: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.
          sprintf(linebuf, _("  %.250s is not installed.\n"), possi->ed->name);
data/dpkg-1.20.5/src/depcon.c:566: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.
          sprintf(linebuf, _("  %.250s (version %.250s) is to be installed.\n"),
data/dpkg-1.20.5/src/depcon.c:629: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(linebuf, _("  %.250s provides %.250s and is to be installed.\n"),
data/dpkg-1.20.5/src/divertcmd.c:235: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).
	srcfd = open(src, O_RDONLY);
data/dpkg-1.20.5/src/enquiry.c:279: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[20];
data/dpkg-1.20.5/src/enquiry.c:322: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(buf,"%d",se->count);
data/dpkg-1.20.5/src/enquiry.c:347: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(buf,"%d",se->count);
data/dpkg-1.20.5/src/unpack.c:328: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 conffilenamebuf[MAXCONFFILENAME];
data/dpkg-1.20.5/src/unpack.c:330: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).
  conff = fopen(control_conffiles, "r");
data/dpkg-1.20.5/src/unpack.c:1159: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(psize, "%jd", (intmax_t)stab.st_size);
data/dpkg-1.20.5/src/verify.c:67:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char result[9];
data/dpkg-1.20.5/src/verify.c:108: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 hash[MD5HASHLEN + 1];
data/dpkg-1.20.5/utils/start-stop-daemon.c:499:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	tty_fd = open("/dev/tty", O_RDWR);
data/dpkg-1.20.5/utils/start-stop-daemon.c:693: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[4096];
data/dpkg-1.20.5/utils/start-stop-daemon.c:747:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW, 0666);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1173:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char item_buf[20];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1206: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(item_buf, schedule_str, str_len);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1384: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).
			nicelevel = atoi(optarg);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1567:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename[32];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1572: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(filename, "/proc/%d/status", pid);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1573: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(filename, "r");
data/dpkg-1.20.5/utils/start-stop-daemon.c:1595:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename[64];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1598: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(filename, "/proc/%d/psinfo", pid);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1599: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(filename, "r");
data/dpkg-1.20.5/utils/start-stop-daemon.c:1659:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errbuf[_POSIX2_LINE_MAX];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1694:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char lname[32];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1695:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char lcontents[_POSIX_PATH_MAX + 1];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1701: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(lname, "/proc/%d/exe", pid);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1727:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename[64];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1729: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(filename, "/proc/%d/object/a.out", pid);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1772:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pathname[_POSIX_PATH_MAX];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1800:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pathname[PATH_MAX];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1827:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[_POSIX2_LINE_MAX];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1997:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[32];
data/dpkg-1.20.5/utils/start-stop-daemon.c:1999: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, "/proc/%d", pid);
data/dpkg-1.20.5/utils/start-stop-daemon.c:2174:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pathname[_POSIX_PATH_MAX];
data/dpkg-1.20.5/utils/start-stop-daemon.c:2283: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).
	f = fopen(name, "r");
data/dpkg-1.20.5/utils/start-stop-daemon.c:2574:16:  [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).
		devnull_fd = open("/dev/null", O_RDWR);
data/dpkg-1.20.5/utils/update-alternatives.c:504: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).
		fh_log = fopen(log_file, "a");
data/dpkg-1.20.5/utils/update-alternatives.c:513: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).
			fh_log = fopen(log_file, "a");
data/dpkg-1.20.5/utils/update-alternatives.c:520:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char timestamp[64];
data/dpkg-1.20.5/utils/update-alternatives.c:1458: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).
	ctx.fh = fopen(ctx.filename, "r");
data/dpkg-1.20.5/utils/update-alternatives.c:1560: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).
	ctx.fh = fopen(ctx.filename, "w");
data/dpkg-1.20.5/utils/update-alternatives.c:1565: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).
		ctx.fh = fopen(ctx.filename, "w");
data/dpkg-1.20.5/utils/update-alternatives.c:1760:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *ret, selection[_POSIX_PATH_MAX];
data/dpkg-1.20.5/utils/update-alternatives.c:2318: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.
	static char string[2048];
data/dpkg-1.20.5/utils/update-alternatives.c:2590: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 line[1024], *res, *name, *status, *choice;
data/dpkg-1.20.5/dpkg-deb/build.c:70:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (fd_write(fd_out, nodename, strlen(nodename) + 1) < 0)
data/dpkg-1.20.5/dpkg-deb/build.c:166: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).
    if (strncmp(virtname, BUILDCONTROLDIR, strlen(BUILDCONTROLDIR)) == 0)
data/dpkg-1.20.5/dpkg-deb/build.c:180: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).
      if (fd_write(fd_out, nodename, strlen(nodename) + 1) < 0)
data/dpkg-1.20.5/dpkg-deb/build.c:190:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (fd_write(fd_out, fi->fn, strlen(fi->fn) + 1) < 0)
data/dpkg-1.20.5/dpkg-deb/build.c:272: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).
    n = strlen(conffilename);
data/dpkg-1.20.5/dpkg-deb/build.c:333: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(pkg->set->name))
data/dpkg-1.20.5/dpkg-deb/build.c:401:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    pathname = m_malloc(strlen(dir) + sizeof(DEBEXT));
data/dpkg-1.20.5/dpkg-deb/build.c:615: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).
    if (fd_write(ar->fd, versionbuf, strlen(versionbuf)) < 0)
data/dpkg-1.20.5/dpkg-deb/build.c:628:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dpkg_ar_member_put_mem(ar, DEBMAGIC, deb_magic, strlen(deb_magic));
data/dpkg-1.20.5/dpkg-deb/extract.c:126: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).
  r = read_line(ar->fd, versionbuf, strlen(DPKG_AR_MAGIC), sizeof(versionbuf) - 1);
data/dpkg-1.20.5/dpkg-deb/extract.c:176:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strncmp(arh.ar_name, ADMINMEMBER, strlen(ADMINMEMBER)) == 0) {
data/dpkg-1.20.5/dpkg-deb/extract.c:177:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          const char *extension = arh.ar_name + strlen(ADMINMEMBER);
data/dpkg-1.20.5/dpkg-deb/extract.c:193:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (strncmp(arh.ar_name, DATAMEMBER, strlen(DATAMEMBER)) == 0) {
data/dpkg-1.20.5/dpkg-deb/extract.c:194:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    const char *extension = arh.ar_name + strlen(DATAMEMBER);
data/dpkg-1.20.5/dpkg-deb/extract.c:235: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).
    l = strlen(versionbuf);
data/dpkg-1.20.5/dpkg-deb/extract.c:253:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      memberlen = ar->size - ctrllennum - strlen(ctrllenbuf) - l;
data/dpkg-1.20.5/dpkg-deb/extract.c:264:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
             (intmax_t)(ar->size - ctrllennum - strlen(ctrllenbuf) - l));
data/dpkg-1.20.5/dpkg-deb/info.c:147:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (getc(cc) == '#') {
data/dpkg-1.20.5/dpkg-deb/info.c:148:13:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (getc(cc) == '!') {
data/dpkg-1.20.5/dpkg-deb/info.c:149:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          while ((c= getc(cc))== ' ');
data/dpkg-1.20.5/dpkg-deb/info.c:152:31:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            *p++= c; il++; c= getc(cc);
data/dpkg-1.20.5/dpkg-deb/info.c:158:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c= getc(cc))!= EOF) { if (c == '\n') lines++; }
data/dpkg-1.20.5/dpkg-deb/info.c:182:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c= getc(cc))!= EOF) {
data/dpkg-1.20.5/dpkg-split/info.c:153: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(ir->md5sum) != MD5HASHLEN ||
data/dpkg-1.20.5/dpkg-split/info.c:210: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).
  ir->filesize = (strlen(DPKG_AR_MAGIC) +
data/dpkg-1.20.5/dpkg-split/info.c:221: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).
  ir->headerlen = strlen(DPKG_AR_MAGIC) +
data/dpkg-1.20.5/dpkg-split/join.c:139: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).
    p= nfmalloc(strlen(refi->package)+1+strlen(refi->version)+sizeof(DEBEXT));
data/dpkg-1.20.5/dpkg-split/join.c:139:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p= nfmalloc(strlen(refi->package)+1+strlen(refi->version)+sizeof(DEBEXT));
data/dpkg-1.20.5/dpkg-split/join.c:141:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(p, "_");
data/dpkg-1.20.5/dpkg-split/join.c:143:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(p, "_");
data/dpkg-1.20.5/dpkg-split/queue.c:114: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).
    p = nfmalloc(strlen(opt_depotdir) + 1 + strlen(de->d_name) + 1);
data/dpkg-1.20.5/dpkg-split/queue.c:114:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p = nfmalloc(strlen(opt_depotdir) + 1 + strlen(de->d_name) + 1);
data/dpkg-1.20.5/dpkg-split/split.c:200:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			prefix_max = max(8 - strlen(refname), 0);
data/dpkg-1.20.5/dpkg-split/split.c:275: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).
		size_t sourcefile_len = strlen(sourcefile);
data/dpkg-1.20.5/dpkg-split/split.c:278:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			sourcefile_len -= strlen(DEBEXT);
data/dpkg-1.20.5/dselect/basecmds.cc:112: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).
  searchlen=strlen(searchstring);
data/dpkg-1.20.5/dselect/basecmds.cc:113: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).
  lendiff = strlen(name) - searchlen;
data/dpkg-1.20.5/dselect/basecmds.cc:150: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).
  int prlen=strlen(pr);
data/dpkg-1.20.5/dselect/main.cc:277:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((colours == nullptr || ! strlen(colours)) &&
data/dpkg-1.20.5/dselect/main.cc:278: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).
        (attributes == nullptr || ! strlen(attributes))) {
data/dpkg-1.20.5/dselect/main.cc:282:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (colours != nullptr && strlen(colours)) {
data/dpkg-1.20.5/dselect/main.cc:284:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (colourname != nullptr && strlen(colourname)) {
data/dpkg-1.20.5/dselect/main.cc:290:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (colourname != nullptr && strlen(colourname)) {
data/dpkg-1.20.5/dselect/main.cc:296:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (attributes != nullptr && strlen(attributes)) {
data/dpkg-1.20.5/dselect/main.cc:298: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).
           attrib != nullptr && strlen(attrib);
data/dpkg-1.20.5/dselect/method.cc:161:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc(stdin);
data/dpkg-1.20.5/dselect/methparse.cc:82: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).
  baselen= strlen(pathbase);
data/dpkg-1.20.5/dselect/methparse.cc:85: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(pathbuf+baselen,"/");
data/dpkg-1.20.5/dselect/methparse.cc:110:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    methodlen= strlen(dent->d_name);
data/dpkg-1.20.5/dselect/methparse.cc:117:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(pathmeth+methodlen, "/");
data/dpkg-1.20.5/dselect/methparse.cc:133: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).
    meth->name= new char[strlen(dent->d_name)+1];
data/dpkg-1.20.5/dselect/methparse.cc:136:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(meth->path,pathbuf,baselen+1+methodlen);
data/dpkg-1.20.5/dselect/methparse.cc:137:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(meth->path+baselen+1+methodlen,"/");
data/dpkg-1.20.5/dselect/methparse.cc:148:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c= fgetc(names)) != EOF) {
data/dpkg-1.20.5/dselect/methparse.cc:158:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c= fgetc(names);
data/dpkg-1.20.5/dselect/methparse.cc:162:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen(vb.string()) > OPTIONINDEXMAXLEN)
data/dpkg-1.20.5/dselect/methparse.cc:167:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c= fgetc(names);
data/dpkg-1.20.5/dselect/methparse.cc:178:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c= fgetc(names);
data/dpkg-1.20.5/dselect/methparse.cc:182:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      opt->name= new char[strlen(vb.string())+1];
data/dpkg-1.20.5/dselect/methparse.cc:186:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c= fgetc(names);
data/dpkg-1.20.5/dselect/methparse.cc:193:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c= fgetc(names);
data/dpkg-1.20.5/dselect/methparse.cc:197: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).
      opt->summary= new char[strlen(vb.string())+1];
data/dpkg-1.20.5/dselect/methparse.cc:228:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            opt->description ? strlen(opt->description) : -1,
data/dpkg-1.20.5/dselect/methparse.cc:266:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (fgetc(cmo) != EOF) { fclose(cmo); return; }
data/dpkg-1.20.5/dselect/methparse.cc:271:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  l= strlen(methoptbuf);  if (!l || methoptbuf[l-1] != '\n') return;
data/dpkg-1.20.5/dselect/pkgdisplay.cc:123: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).
    int l= strlen(gettext(*array));
data/dpkg-1.20.5/dselect/pkgdisplay.cc:265: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).
    int l= strlen(helpstring);
data/dpkg-1.20.5/dselect/pkglist.cc:525: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).
  for (pos = strlen(rx) - 1; pos >= 0; pos--)
data/dpkg-1.20.5/dselect/pkgtop.cc:114:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                           strlen(table[cursorline]->pkg->set->name) : 0),
data/dpkg-1.20.5/dselect/pkgtop.cc:115: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).
                          (section ? strlen(section) : 0) +
data/dpkg-1.20.5/dselect/pkgtop.cc:116:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          (priority ? strlen(priority) : 0))];
data/dpkg-1.20.5/dselect/pkgtop.cc:249:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        (section ? strlen(section) : 0) +
data/dpkg-1.20.5/dselect/pkgtop.cc:250: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).
                        (priority ? strlen(priority) : 0)];
data/dpkg-1.20.5/lib/compat/getopt.c:234: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).
extern int strlen (const char *);
data/dpkg-1.20.5/lib/compat/getopt.c:431: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).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/dpkg-1.20.5/lib/compat/getopt.c:655:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		== (unsigned int) strlen (p->name))
data/dpkg-1.20.5/lib/compat/getopt.c:679:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:711: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).
		  nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:727: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).
		  nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:732:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:843:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/dpkg-1.20.5/lib/compat/getopt.c:866: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).
	    nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:886: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).
		    nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:900: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).
		    nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/getopt.c:904: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).
	    nextchar += strlen (nextchar);
data/dpkg-1.20.5/lib/compat/gettext.h:199: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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/dpkg-1.20.5/lib/compat/gettext.h:200:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t msgid_len = strlen (msgid) + 1;
data/dpkg-1.20.5/lib/compat/gettext.h:245: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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/dpkg-1.20.5/lib/compat/gettext.h:246:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t msgid_len = strlen (msgid) + 1;
data/dpkg-1.20.5/lib/compat/scandir.c:81: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).
		m = malloc(sizeof(*m) + strlen(e->d_name));
data/dpkg-1.20.5/lib/compat/strchrnul.c:36:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return (char *)s + strlen(s);
data/dpkg-1.20.5/lib/compat/unsetenv.c:32: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).
	q = malloc(strlen(p) + 3);
data/dpkg-1.20.5/lib/compat/unsetenv.c:37: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(q, "=");
data/dpkg-1.20.5/lib/dpkg/ar.c:161: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).
	if (fd_write(ar->fd, DPKG_AR_MAGIC, strlen(DPKG_AR_MAGIC)) < 0)
data/dpkg-1.20.5/lib/dpkg/ar.c:171:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(member->name) > 15)
data/dpkg-1.20.5/lib/dpkg/db-ctrl-access.c:101: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(pkgname) != (size_t)(dot - db_de->d_name) ||
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:172: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).
  updatefnbuf = m_malloc(strlen(updatesdir) + IMPORTANTMAXLEN + 5);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:174:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  updatefnrest = updatefnbuf + strlen(updatefnbuf);
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:369:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(updatefnrest) > IMPORTANTMAXLEN)
data/dpkg-1.20.5/lib/dpkg/dbmodify.c:437: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(updatefnrest) > IMPORTANTMAXLEN)
data/dpkg-1.20.5/lib/dpkg/fdio.c:39:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read(fd, ptr + total, len);
data/dpkg-1.20.5/lib/dpkg/fields.c:292: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).
    newversion = nfmalloc(strlen(pkgbin->version.version) +
data/dpkg-1.20.5/lib/dpkg/fields.c:293: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).
                          strlen(pkgbin->version.revision) + 2);
data/dpkg-1.20.5/lib/dpkg/fsys-hash.c:110: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).
		char *newname = nfmalloc(strlen(name) + 2);
data/dpkg-1.20.5/lib/dpkg/nfmalloc.c:58: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).
  return obstack_copy0 (&db_obs, string, strlen(string));
data/dpkg-1.20.5/lib/dpkg/options.c:90: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).
    l = strlen(linebuf);
data/dpkg-1.20.5/lib/dpkg/options.c:115:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      l=strlen(cip->olong);
data/dpkg-1.20.5/lib/dpkg/options.c:238: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).
        l= strlen(cip->olong);
data/dpkg-1.20.5/lib/dpkg/parse.c:143: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).
          strlen(arp->name) == (size_t)fs->fieldlen)
data/dpkg-1.20.5/lib/dpkg/path.c:50: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).
	for (end = path + strlen(path) - 1; end - path >= 1; end--) {
data/dpkg-1.20.5/lib/dpkg/pkg-show.c:91:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	pkgname = nfmalloc(strlen(pkg->set->name) + 1 +
data/dpkg-1.20.5/lib/dpkg/pkg-show.c:92:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	                   strlen(pkgbin->arch->name) + 1);
data/dpkg-1.20.5/lib/dpkg/program.c:47:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(022);
data/dpkg-1.20.5/lib/dpkg/string.c:40: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/dpkg-1.20.5/lib/dpkg/string.c:61: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).
	size_t str_len = strlen(str);
data/dpkg-1.20.5/lib/dpkg/string.c:62: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).
	size_t end_len = strlen(end);
data/dpkg-1.20.5/lib/dpkg/string.c:141: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).
	new_dst = dst = m_malloc(strlen(src) * 2);
data/dpkg-1.20.5/lib/dpkg/string.c:166:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t str_len = strlen(str);
data/dpkg-1.20.5/lib/dpkg/strwide.c:52: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(str) + 1;
data/dpkg-1.20.5/lib/dpkg/strwide.c:65: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).
		return strlen(str);
data/dpkg-1.20.5/lib/dpkg/strwide.c:75: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).
	return strlen(str);
data/dpkg-1.20.5/lib/dpkg/strwide.c:102: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).
	str_bytes = strlen(str) + 1;
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:44: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).
	buffer_md5(str_empty, hash, strlen(str_empty));
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:47: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).
	buffer_md5(str_test, hash, strlen(str_test));
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:65:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(write(fd, str_test, strlen(str_test)) == (ssize_t)strlen(str_test));
data/dpkg-1.20.5/lib/dpkg/t/t-buffer.c:65:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(write(fd, str_test, strlen(str_test)) == (ssize_t)strlen(str_test));
data/dpkg-1.20.5/lib/dpkg/t/t-file.c:78:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(write(fd, ref_data, strlen(ref_data)) == (ssize_t)strlen(ref_data));
data/dpkg-1.20.5/lib/dpkg/t/t-file.c:78:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(write(fd, ref_data, strlen(ref_data)) == (ssize_t)strlen(ref_data));
data/dpkg-1.20.5/lib/dpkg/t/t-file.c:82:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(vb.used == strlen(ref_data));
data/dpkg-1.20.5/lib/dpkg/t/t-file.c:83:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_mem(vb.buf, ==, ref_data, min(vb.used, strlen(ref_data)));
data/dpkg-1.20.5/lib/dpkg/t/t-namevalue.c:39: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).
	test_pass(nv->length == strlen("no"));
data/dpkg-1.20.5/lib/dpkg/t/t-path.c:131: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(src_7_bit) + 1;
data/dpkg-1.20.5/lib/dpkg/t/t-path.c:139: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(src_7_bit_trim) + 1;
data/dpkg-1.20.5/lib/dpkg/t/t-path.c:147: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(src_8_bit) * 2 + 1;
data/dpkg-1.20.5/lib/dpkg/t/t-path.c:156: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(src_8_bit_end) + 1 + 2;
data/dpkg-1.20.5/lib/dpkg/t/t-path.c:164: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(src_bs_end) + 1;
data/dpkg-1.20.5/lib/dpkg/t/t-varbuf.c:283:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(vb.used == strlen("format string number 10"));
data/dpkg-1.20.5/lib/dpkg/t/t-varbuf.c:292:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	test_pass(vb.used == strlen("format string number 10 extra string"));
data/dpkg-1.20.5/lib/dpkg/tarfn.c:367:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		status = tar->ops->read(tar, buf, TARBLKSZ);
data/dpkg-1.20.5/lib/dpkg/tarfn.c:462:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((status = tar->ops->read(tar, buffer, TARBLKSZ)) == TARBLKSZ) {
data/dpkg-1.20.5/lib/dpkg/tarfn.c:495: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).
		name_len = strlen(h.name);
data/dpkg-1.20.5/lib/dpkg/tarfn.h:96:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	tar_read_func *read;
data/dpkg-1.20.5/lib/dpkg/treewalk.c:72:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	node->pathname_len = strlen(node->pathname);
data/dpkg-1.20.5/lib/dpkg/treewalk.c:92:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	node->pathname_len = strlen(node->pathname);
data/dpkg-1.20.5/lib/dpkg/triglib.c:338:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len = strlen(pkgname);
data/dpkg-1.20.5/lib/dpkg/utils.c:39:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l = strlen(buf);
data/dpkg-1.20.5/lib/dpkg/varbuf.h:89:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define varbuf_add_str(v, s) varbuf_add_buf(v, s, strlen(s))
data/dpkg-1.20.5/src/archives.c:1515:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strcmp(nodename + strlen(nodename) - 4, ".deb") != 0)
data/dpkg-1.20.5/src/configure.c:172:14:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getchar()) != EOF && c != '\n')
data/dpkg-1.20.5/src/configure.c:401: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).
	cdr2rest = cdr2.buf + strlen(cdr.buf);
data/dpkg-1.20.5/src/enquiry.c:169:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  l= strlen(pkg->set->name);
data/dpkg-1.20.5/src/enquiry.c:324: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).
      width= 70-strlen(se->name)-strlen(buf);
data/dpkg-1.20.5/src/enquiry.c:324:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      width= 70-strlen(se->name)-strlen(buf);
data/dpkg-1.20.5/src/enquiry.c:333: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).
        width -= strlen(pkgname);
data/dpkg-1.20.5/src/enquiry.c:348:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      width -= (6 + strlen(se->name) + strlen(buf));
data/dpkg-1.20.5/src/enquiry.c:348: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).
      width -= (6 + strlen(se->name) + strlen(buf));
data/dpkg-1.20.5/src/enquiry.c:349:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (width < 0) { putchar('\n'); width= 73 - strlen(se->name) - strlen(buf); }
data/dpkg-1.20.5/src/enquiry.c:349:70:  [1] (buffer) strlen:
  Does not handle 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 (width < 0) { putchar('\n'); width= 73 - strlen(se->name) - strlen(buf); }
data/dpkg-1.20.5/src/filters.c:115:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				path_len = strlen(f->pattern);
data/dpkg-1.20.5/src/force.c:325: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(fip->name) == l)
data/dpkg-1.20.5/src/help.c:229: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).
  namelen = strlen(file->name);
data/dpkg-1.20.5/src/help.c:234: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).
          strlen(conff->name) > namelen && conff->name[namelen] == '/') {
data/dpkg-1.20.5/src/help.c:287: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).
  namelen = strlen(file->name);
data/dpkg-1.20.5/src/help.c:294: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).
        strlen(node->namenode->name) > namelen &&
data/dpkg-1.20.5/src/main.c:305: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).
  copy= m_malloc(strlen(value)+2);
data/dpkg-1.20.5/src/main.c:307: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).
  copy[strlen(value) + 1] = '\0';
data/dpkg-1.20.5/src/main.c:322: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).
    p+= strlen(p)+1;
data/dpkg-1.20.5/src/main.c:680:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getc(in);
data/dpkg-1.20.5/src/main.c:686:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      do { c= getc(in); if (c == '\n') lno++; } while (c != EOF && c != '\n');
data/dpkg-1.20.5/src/main.c:692:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c= getc(in);
data/dpkg-1.20.5/src/querycmd.c:619: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(filetype) > MAXCONTROLFILENAME)
data/dpkg-1.20.5/src/remove.c:581:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      conffbasenamelen= strlen(++p);
data/dpkg-1.20.5/src/script.c:101:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t instdirlen = strlen(instdir);
data/dpkg-1.20.5/src/script.c:146:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(cmd->filename) < instdirlen)
data/dpkg-1.20.5/src/select.c:52: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).
  l = strlen(pkgname);
data/dpkg-1.20.5/src/select.c:139:11:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getchar();
data/dpkg-1.20.5/src/select.c:145:15:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      do { c= getchar(); if (c == '\n') lno++; } while (c != EOF && c != '\n');
data/dpkg-1.20.5/src/select.c:152:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c= getchar();
data/dpkg-1.20.5/src/select.c:160:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c= getchar();
data/dpkg-1.20.5/src/select.c:169:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c= getchar();
data/dpkg-1.20.5/src/select.c:174:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c= getchar();
data/dpkg-1.20.5/src/unpack.c:69:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
       pfilename && strlen(pfilename) > 30 && strchr(pfilename, '/') != NULL;
data/dpkg-1.20.5/src/unpack.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).
    pfilenamebuf = nfmalloc(strlen(pfilename) + 5);
data/dpkg-1.20.5/src/unpack.c:171: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).
    cidir = m_realloc(cidir, strlen(tmpdir) + MAXCONTROLFILENAME + 10);
data/dpkg-1.20.5/src/unpack.c:183: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).
      cidir = m_malloc(strlen(admindir) + sizeof(CONTROLDIRTMP) +
data/dpkg-1.20.5/src/unpack.c:195: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(cidir, "/");
data/dpkg-1.20.5/src/unpack.c:347: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).
    p = conffilenamebuf + strlen(conffilenamebuf);
data/dpkg-1.20.5/src/unpack.c:447: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(filetype) > MAXCONTROLFILENAME)
data/dpkg-1.20.5/src/unpack.c:511:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(de->d_name) > MAXCONTROLFILENAME)
data/dpkg-1.20.5/src/unpack.c:1118:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  cidirrest = cidir + strlen(cidir);
data/dpkg-1.20.5/utils/start-stop-daemon.c:455: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).
	path_len = strlen(dirname) + 1 + strlen(filename) + 1;
data/dpkg-1.20.5/utils/start-stop-daemon.c:455:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	path_len = strlen(dirname) + 1 + strlen(filename) + 1;
data/dpkg-1.20.5/utils/start-stop-daemon.c:627:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(su.sun_path, sockname, sizeof(su.sun_path) - 1);
data/dpkg-1.20.5/utils/start-stop-daemon.c:825:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(022);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1469: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 (cmdname && strlen(cmdname) > PROCESS_NAME_SIZE)
data/dpkg-1.20.5/utils/start-stop-daemon.c:1570:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t field_len = strlen(field);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1712: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).
	if (strncmp(filename, deleted, strlen(deleted)) == 0)
data/dpkg-1.20.5/utils/start-stop-daemon.c:1713: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).
		filename += strlen(deleted);
data/dpkg-1.20.5/utils/start-stop-daemon.c:1714: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).
	else if (strcmp(filename + nread - strlen(deleted), deleted) == 0)
data/dpkg-1.20.5/utils/start-stop-daemon.c:1715: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).
		filename[nread - strlen(deleted)] = '\0';
data/dpkg-1.20.5/utils/start-stop-daemon.c:1854:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, *pid_argv_p, (end_argv_0_p - start_argv_0_p));
data/dpkg-1.20.5/utils/start-stop-daemon.c:2132: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).
	argv0_len = strlen(argv0) + 1;
data/dpkg-1.20.5/utils/start-stop-daemon.c:2588:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(umask_value);
data/dpkg-1.20.5/utils/update-alternatives.c:557:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	instdir_len = strlen(dir);
data/dpkg-1.20.5/utils/update-alternatives.c:1237: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(entry->d_name) > strlen(ALT_TMP_EXT) &&
data/dpkg-1.20.5/utils/update-alternatives.c:1237:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    (strlen(entry->d_name) > strlen(ALT_TMP_EXT) &&
data/dpkg-1.20.5/utils/update-alternatives.c:1238: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).
	     strcmp(entry->d_name + strlen(entry->d_name) -
data/dpkg-1.20.5/utils/update-alternatives.c:1239: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).
	            strlen(ALT_TMP_EXT), ALT_TMP_EXT) == 0))
data/dpkg-1.20.5/utils/update-alternatives.c:1278:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for (i = 0; true; i += strlen(line)) {
data/dpkg-1.20.5/utils/update-alternatives.c:1282: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(buf) < bufsz - 1 || buf[bufsz - 2] == '\n')
data/dpkg-1.20.5/utils/update-alternatives.c:1298: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(buf);
data/dpkg-1.20.5/utils/update-alternatives.c:1334:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (fprintf(ctx->fh, "%s\n", line) < (int) strlen(line) + 1)
data/dpkg-1.20.5/utils/update-alternatives.c:1345: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)) { /* End of list */
data/dpkg-1.20.5/utils/update-alternatives.c:1386: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(master_file)) { /* End of list */
data/dpkg-1.20.5/utils/update-alternatives.c:1772:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = max(len, (int)strlen(fs->master_file) + 1);
data/dpkg-1.20.5/utils/update-alternatives.c:1791:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (ret == NULL || strlen(selection) == 0) {
data/dpkg-1.20.5/utils/update-alternatives.c:1794: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).
		selection[strlen(selection) - 1] = '\0';
data/dpkg-1.20.5/utils/update-alternatives.c:1795: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(selection) == 0)
data/dpkg-1.20.5/utils/update-alternatives.c:2325:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t arg_len = strlen(argv[i]);
data/dpkg-1.20.5/utils/update-alternatives.c:2330:4:  [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(string + cur_len, " ");
data/dpkg-1.20.5/utils/update-alternatives.c:2602: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(line);
data/dpkg-1.20.5/utils/update-alternatives.c:2842:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(022);

ANALYSIS SUMMARY:

Hits = 644
Lines analyzed = 58450 in approximately 1.73 seconds (33856 lines/second)
Physical Source Lines of Code (SLOC) = 39831
Hits@level = [0] 369 [1] 222 [2] 240 [3]  36 [4] 130 [5]  16
Hits@level+ = [0+] 1013 [1+] 644 [2+] 422 [3+] 182 [4+] 146 [5+]  16
Hits/KSLOC@level+ = [0+] 25.4325 [1+] 16.1683 [2+] 10.5948 [3+] 4.56931 [4+] 3.66549 [5+] 0.401697
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.