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/rpm-4.14.2.1+dfsg1/rpmsign.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/digest_beecrypt.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/macro.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/digest_nss.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmhook.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmstrpool.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmsw.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmbase64.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/digest.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/argv.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmkeyring.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmio_internal.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmsq.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmurl.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmlog.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmmacro.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/url.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmstrpool.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmmalloc.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/digest.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmkeyring.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmlog.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/base64.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmsq.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/argv.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmutil.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/digest_openssl.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmhook.c
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmsw.h
Examining data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c
Examining data/rpm-4.14.2.1+dfsg1/doc/hacking/Doxyheader.h
Examining data/rpm-4.14.2.1+dfsg1/doc/librpm/Doxyheader.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmfiles.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmvf.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmdb.h
Examining data/rpm-4.14.2.1+dfsg1/lib/verify.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmarchive.h
Examining data/rpm-4.14.2.1+dfsg1/lib/poptQV.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmlead.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmte.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmfs.h
Examining data/rpm-4.14.2.1+dfsg1/lib/fsm.h
Examining data/rpm-4.14.2.1+dfsg1/lib/cpio.h
Examining data/rpm-4.14.2.1+dfsg1/lib/fprint.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmlib.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmts_internal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmlead.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpminstall.c
Examining data/rpm-4.14.2.1+dfsg1/lib/fprint.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmds_internal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmds.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.h
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.h
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmxdb.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.h
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmxdb.h
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/glue.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/dbiset.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/dbiset.h
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c
Examining data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmts.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmlock.h
Examining data/rpm-4.14.2.1+dfsg1/lib/order.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmfi.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmal.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmcallback.h
Examining data/rpm-4.14.2.1+dfsg1/lib/relocation.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmug.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmps.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmdb_internal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmchecksig.c
Examining data/rpm-4.14.2.1+dfsg1/lib/psm.c
Examining data/rpm-4.14.2.1+dfsg1/lib/header.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmte.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmte_internal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/package.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmlock.c
Examining data/rpm-4.14.2.1+dfsg1/lib/query.c
Examining data/rpm-4.14.2.1+dfsg1/lib/header_internal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmvs.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmts.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmchroot.h
Examining data/rpm-4.14.2.1+dfsg1/lib/poptALL.c
Examining data/rpm-4.14.2.1+dfsg1/lib/signature.c
Examining data/rpm-4.14.2.1+dfsg1/lib/tagname.c
Examining data/rpm-4.14.2.1+dfsg1/lib/cpio.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmds.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmtriggers.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmug.c
Examining data/rpm-4.14.2.1+dfsg1/lib/header.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmfi_internal.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmhash.C
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmtypes.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c
Examining data/rpm-4.14.2.1+dfsg1/lib/headerutil.c
Examining data/rpm-4.14.2.1+dfsg1/lib/tagtbl.C
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmhash.H
Examining data/rpm-4.14.2.1+dfsg1/lib/formats.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmscript.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmplugins.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmliblua.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmtag.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmgi.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmplugins.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmpol.h
Examining data/rpm-4.14.2.1+dfsg1/lib/misc.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmtd.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmtriggers.c
Examining data/rpm-4.14.2.1+dfsg1/lib/tagexts.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmps.c
Examining data/rpm-4.14.2.1+dfsg1/lib/transaction.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmprob.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmvs.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmtd.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmchroot.c
Examining data/rpm-4.14.2.1+dfsg1/lib/signature.h
Examining data/rpm-4.14.2.1+dfsg1/lib/fsm.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmgi.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmfs.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmcli.h
Examining data/rpm-4.14.2.1+dfsg1/lib/manifest.h
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmplugin.h
Examining data/rpm-4.14.2.1+dfsg1/lib/manifest.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmliblua.c
Examining data/rpm-4.14.2.1+dfsg1/lib/poptI.c
Examining data/rpm-4.14.2.1+dfsg1/lib/rpmprob.h
Examining data/rpm-4.14.2.1+dfsg1/lib/depends.c
Examining data/rpm-4.14.2.1+dfsg1/rpm2cpio.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmps-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmmacro-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmtd-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmmi-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmds-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmarchive-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmsmodule.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmte-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmts-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmfi-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmfd-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/spec-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmsystem-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmarchive-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmmacro-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/header-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmtd-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmfi-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmfd-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmstrpool-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmfiles-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmmodule.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmii-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmmi-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/spec-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmts-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/header-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmii-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmkeyring-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmkeyring-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmfiles-py.h
Examining data/rpm-4.14.2.1+dfsg1/python/rpmte-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmps-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmbmodule.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmstrpool-py.c
Examining data/rpm-4.14.2.1+dfsg1/python/rpmds-py.c
Examining data/rpm-4.14.2.1+dfsg1/rpmdb.c
Examining data/rpm-4.14.2.1+dfsg1/rpm2archive.c
Examining data/rpm-4.14.2.1+dfsg1/tests/data/SOURCES/hello.c
Examining data/rpm-4.14.2.1+dfsg1/plugins/syslog.c
Examining data/rpm-4.14.2.1+dfsg1/plugins/ima.c
Examining data/rpm-4.14.2.1+dfsg1/plugins/prioreset.c
Examining data/rpm-4.14.2.1+dfsg1/plugins/selinux.c
Examining data/rpm-4.14.2.1+dfsg1/plugins/systemd_inhibit.c
Examining data/rpm-4.14.2.1+dfsg1/cliutils.c
Examining data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.c
Examining data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c
Examining data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.h
Examining data/rpm-4.14.2.1+dfsg1/sign/rpmsign.h
Examining data/rpm-4.14.2.1+dfsg1/misc/fnmatch.h
Examining data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c
Examining data/rpm-4.14.2.1+dfsg1/misc/stpncpy.c
Examining data/rpm-4.14.2.1+dfsg1/misc/rpmfts.h
Examining data/rpm-4.14.2.1+dfsg1/misc/fts.c
Examining data/rpm-4.14.2.1+dfsg1/misc/stpcpy.c
Examining data/rpm-4.14.2.1+dfsg1/luaext/lposix.h
Examining data/rpm-4.14.2.1+dfsg1/luaext/userconfig.c
Examining data/rpm-4.14.2.1+dfsg1/luaext/lrexlib.h
Examining data/rpm-4.14.2.1+dfsg1/luaext/modemuncher.c
Examining data/rpm-4.14.2.1+dfsg1/luaext/lposix.c
Examining data/rpm-4.14.2.1+dfsg1/luaext/lrexlib.c
Examining data/rpm-4.14.2.1+dfsg1/cliutils.h
Examining data/rpm-4.14.2.1+dfsg1/tools/debugedit.c
Examining data/rpm-4.14.2.1+dfsg1/tools/elfdeps.c
Examining data/rpm-4.14.2.1+dfsg1/tools/rpmdeps.c
Examining data/rpm-4.14.2.1+dfsg1/tools/hashtab.c
Examining data/rpm-4.14.2.1+dfsg1/tools/rpmgraph.c
Examining data/rpm-4.14.2.1+dfsg1/tools/hashtab.h
Examining data/rpm-4.14.2.1+dfsg1/tools/sepdebugcrcfix.c
Examining data/rpm-4.14.2.1+dfsg1/rpmspec.c
Examining data/rpm-4.14.2.1+dfsg1/rpmkeys.c
Examining data/rpm-4.14.2.1+dfsg1/system.h
Examining data/rpm-4.14.2.1+dfsg1/debug.h
Examining data/rpm-4.14.2.1+dfsg1/rpmbuild.c
Examining data/rpm-4.14.2.1+dfsg1/build/parseFiles.c
Examining data/rpm-4.14.2.1+dfsg1/build/parsePolicies.c
Examining data/rpm-4.14.2.1+dfsg1/build/parsePrep.c
Examining data/rpm-4.14.2.1+dfsg1/build/parseScript.c
Examining data/rpm-4.14.2.1+dfsg1/build/parseDescription.c
Examining data/rpm-4.14.2.1+dfsg1/build/files.c
Examining data/rpm-4.14.2.1+dfsg1/build/parseReqs.c
Examining data/rpm-4.14.2.1+dfsg1/build/rpmspec.h
Examining data/rpm-4.14.2.1+dfsg1/build/expression.c
Examining data/rpm-4.14.2.1+dfsg1/build/reqprov.c
Examining data/rpm-4.14.2.1+dfsg1/build/build.c
Examining data/rpm-4.14.2.1+dfsg1/build/rpmbuild_internal.h
Examining data/rpm-4.14.2.1+dfsg1/build/parsePreamble.c
Examining data/rpm-4.14.2.1+dfsg1/build/misc.c
Examining data/rpm-4.14.2.1+dfsg1/build/pack.c
Examining data/rpm-4.14.2.1+dfsg1/build/rpmfc.h
Examining data/rpm-4.14.2.1+dfsg1/build/rpmbuild_misc.h
Examining data/rpm-4.14.2.1+dfsg1/build/parseChangelog.c
Examining data/rpm-4.14.2.1+dfsg1/build/policies.c
Examining data/rpm-4.14.2.1+dfsg1/build/rpmbuild.h
Examining data/rpm-4.14.2.1+dfsg1/build/rpmfc.c
Examining data/rpm-4.14.2.1+dfsg1/build/parseBuildInstallClean.c
Examining data/rpm-4.14.2.1+dfsg1/build/parseSpec.c
Examining data/rpm-4.14.2.1+dfsg1/build/spec.c
Examining data/rpm-4.14.2.1+dfsg1/rpmqv.c

FINAL RESULTS:

data/rpm-4.14.2.1+dfsg1/build/files.c:1194:21:  [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.
	    ssize_t llen = readlink(flp->diskPath, buf, BUFSIZ-1);
data/rpm-4.14.2.1+dfsg1/build/files.c:1682:14:  [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.
	if ((llen = readlink(linkpath, ltarget, sizeof(ltarget)-1)) != -1) {
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:312:20:  [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.
    ssize_t llen = readlink(path, buf, bufsize - 1);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:525:13:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    (void) chmod(path, stb.st_mode & 0777);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:601:55:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    int rc = S_ISLNK(mode) ? lchown(path, uid, gid) : chown(path, uid, gid);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:617:14:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    int rc = chmod(path, (mode & 07777));
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:2473:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	xx = chown(filepath, st.st_uid, st.st_gid);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:2476:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    xx = chmod(filepath, (st.st_mode & 07777));
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:2478:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    xx = chmod(filepath, (st.st_mode & 07666));
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1022:13:  [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.
	link_len = readlink(fn, buffer, sizeof(buffer) - 1);
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1132:25:  [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.
	    ssize_t link_len = readlink(fn, buffer, sizeof(buffer) - 1);
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1236:21:  [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.
	ssize_t link_len = readlink(fn, buffer, sizeof(buffer) - 1);
data/rpm-4.14.2.1+dfsg1/lib/verify.c:153:14:  [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.
	if ((size = readlink(fn, linkto, sizeof(linkto)-1)) == -1)
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:302: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.
	int n = readlink(path, buf, sizeof(buf));
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:484:23:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	return pushresult(L, chmod(path, mode), path);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:493:23:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	return pushresult(L, chown(path, uid, gid), path);
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:409:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	(void) chmod(specFile, 0666 & ~mask);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:295:8:  [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(d, uid, gid);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:311: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.
	llen = readlink(procpath, buf, sizeof(buf)-1);
data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c:809:30:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			rename(trpm, rpm) == 0 && chmod(rpm, st.st_mode) == 0) {
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2586:3:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  chmod (file, stat_buf.st_mode | S_IRUSR | S_IWUSR);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2792:3:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  chmod (file, stat_buf.st_mode);
data/rpm-4.14.2.1+dfsg1/tools/sepdebugcrcfix.c:323:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
      chmod (fname, stat_buf.st_mode | S_IRUSR | S_IWUSR);
data/rpm-4.14.2.1+dfsg1/tools/sepdebugcrcfix.c:360:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
      chmod (fname, stat_buf.st_mode);
data/rpm-4.14.2.1+dfsg1/build/build.c:161:9:  [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.
	(void) execvp(argv[0], (char *const *)argv);
data/rpm-4.14.2.1+dfsg1/build/files.c:1340:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	diskPath = strcpy(buf, diskPath);
data/rpm-4.14.2.1+dfsg1/build/files.c:1945:19:  [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.
		int addsubdir = access (buildidsubdir, F_OK) == -1;
data/rpm-4.14.2.1+dfsg1/build/files.c:2863:6:  [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(path, F_OK) == 0) {
data/rpm-4.14.2.1+dfsg1/build/files.c:2898:6:  [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(path, F_OK) == 0) {
data/rpm-4.14.2.1+dfsg1/build/misc.c:72: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(sb->tail, s);
data/rpm-4.14.2.1+dfsg1/build/pack.c:188:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(hostname, bhMacro);
data/rpm-4.14.2.1+dfsg1/build/pack.c:195:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(hostname, hbn->h_name);
data/rpm-4.14.2.1+dfsg1/build/pack.c:631:10:  [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.
    xx = system(pkgcheck);
data/rpm-4.14.2.1+dfsg1/build/parsePreamble.c:1057:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(lang, (p->type == 1) ? RPMBUILD_DEFAULT_LANG : "");
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:288: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(argv[0], (char *const *)argv);
data/rpm-4.14.2.1+dfsg1/cliutils.c:61:9:  [4] (shell) execl:
  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.
	(void) execl("/bin/sh", "/bin/sh", "-c", rpmcliPipeOutput, NULL);
data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.c:62: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(path, F_OK) == 0 && rdb->db_ops != &lmdb_dbops) {
data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.c:71: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(path, F_OK) == 0 && rdb->db_ops != &ndb_dbops) {
data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.c:79: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(path, F_OK) == 0 && rdb->db_ops != &db3_dbops) {
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:174:6:  [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(dbhome, W_OK) && (rdb->db_mode & O_ACCMODE) == O_RDONLY)
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:430:20:  [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.
	unsigned tflags = access(dbhome, W_OK) ? MDB_RDONLY : 0;
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:648:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(nidxdb->filename, "%s-XXXXXX", idxdb->filename);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:977: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(ndep + 1, dep);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1008:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(fpdep, dirnames[i]);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1009:6:  [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(fpdep, basename);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:509:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(ldn, dn);
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:233:2:  [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(errbuf, sizeof(errbuf), fmt, ap);
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:656:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fmtbuf, "%%%ss", tag->format);
data/rpm-4.14.2.1+dfsg1/lib/query.c:48: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.
    snprintf(sizefield, sizeof(sizefield), "%20" PRIu64, size);
data/rpm-4.14.2.1+dfsg1/lib/query.c:532: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(a, *arg);
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:252: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(fn, relocations[j].newPath);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:2425: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(oldkeys, F_OK ) != -1) {
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:587:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(n, option->name);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1033:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(un.machine, __power_pc() ? "ppc" : "rs6000");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1034:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(un.sysname,"aix%s.%s", un.version, un.release);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1049:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(un.sysname, "solaris%1d%s", atoi(un.release)-3,
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1060:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(un.sysname, "hpux%s", strpbrk(un.release, "123456789"));
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1063:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(un.sysname, "osf%s", strpbrk(un.release, "123456789"));
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1601:6:  [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(*p, R_OK) != 0) {
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:209:7:  [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.
	xx = execv(argv[0], argv);
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:586: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(script->args[0], prog);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:47:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(lastUname, thisUname);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:90: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(lastGname, thisGname);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:134: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(lastUname, pwent->pw_name);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:165: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(lastGname, grent->gr_name);
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:28: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(str1, a);
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:29: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(str2, b);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:324: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.
	return pushresult(L, access(path, mode), path);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:351: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(path,argv);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:551:20:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
	lua_pushstring(L, getlogin());
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:362:13:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if (!(fp = popen(cmd, "r"))) {
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:427:16:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if ((shf = popen(buf, "r")) == NULL) {
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:944:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__cat %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:947:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__gzip -dc %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:950:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__bzip2 -dc %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:953:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__unzip %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:957:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(be, "%%__xz -dc %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:960:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__lzip -dc %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:963:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__lrzip -dqo- %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:966:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__7zip x %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:969:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%%__zstd -dc %s", b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:976:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s", rpmConfigDir());
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:983:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(b, "%%SOURCE%s", buf);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:991:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(b, "%%PATCH%s", buf);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:996:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(b, "file%s.file", buf);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:305:21:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
		success = (name = getlogin()) != NULL;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:918:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(globRoot, globFile);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:64:67:  [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.
    if ((_rpmio_debug | ((_f) ? ((FD_t)(_f))->flags : 0)) & (_m)) fprintf _x \
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:192:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%s %d fp %p", iot->ioname, fps->fdno, fps->fp);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:194:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(be, "%s %p fp %d", iot->ioname, fps->fp, fps->fdno);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlog.c:420: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.
    n = vsnprintf(NULL, 0, fmt, ap);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlog.c:429: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(msg, nb, fmt, ap);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c:298: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.
    blen = vsnprintf(NULL, 0, key, va);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c:304: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.
    vsnprintf(buf, blen + 1, key, va);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmmalloc.c:77: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 (newstr, str);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:69: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.
    n = vsnprintf(NULL, 0, fmt, ap);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:76:13:  [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(p, nb, fmt, ap);
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:118:9:  [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(argv[0], argv);
data/rpm-4.14.2.1+dfsg1/build/build.c:206:2:  [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.
	getenv("SOURCE_DATE_EPOCH") == NULL) {
data/rpm-4.14.2.1+dfsg1/build/files.c:993: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.
    char *srcdate = getenv("SOURCE_DATE_EPOCH");
data/rpm-4.14.2.1+dfsg1/build/files.c:1721:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	    char *rpath1 = realpath(origpath, NULL);
data/rpm-4.14.2.1+dfsg1/build/files.c:1722:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	    char *rpath2 = realpath(linkpath, NULL);
data/rpm-4.14.2.1+dfsg1/build/pack.c:163: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.
        srcdate = getenv("SOURCE_DATE_EPOCH");
data/rpm-4.14.2.1+dfsg1/build/parseChangelog.c:161: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.
    tz = getenv("TZ");
data/rpm-4.14.2.1+dfsg1/lib/fprint.c:156:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(".", cdnbuf) != NULL) {
data/rpm-4.14.2.1+dfsg1/lib/header.c:1268:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((lang = getenv("LANGUAGE")) == NULL &&
data/rpm-4.14.2.1+dfsg1/lib/header.c:1269: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.
	(lang = getenv("LC_ALL")) == NULL &&
data/rpm-4.14.2.1+dfsg1/lib/header.c:1270: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.
	(lang = getenv("LC_MESSAGES")) == NULL &&
data/rpm-4.14.2.1+dfsg1/lib/header.c:1271: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.
	(lang = getenv("LANG")) == NULL)
data/rpm-4.14.2.1+dfsg1/lib/poptALL.c:313: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.
    if ((execPath = getenv("RPM_POPTEXEC_PATH")) == NULL)
data/rpm-4.14.2.1+dfsg1/lib/query.c:451:11:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	    fn = realpath(arg, fnbuf);
data/rpm-4.14.2.1+dfsg1/lib/rpmchroot.c:67:25:  [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 (chdir("/") == 0 && chroot(rootState.rootDir) == 0) {
data/rpm-4.14.2.1+dfsg1/lib/rpmchroot.c:92:6:  [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(".") == 0 && fchdir(rootState.cwd) == 0) {
data/rpm-4.14.2.1+dfsg1/lib/tagexts.c:575:12:  [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.
	langval = getenv(language);
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:76:27:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char *resolved_path = realpath(dirName, mntPoint);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:448: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.
		lua_pushstring(L, getenv(luaL_checkstring(L, 1)));
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:240:33:  [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 !defined _LIBC && !defined getenv
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:241: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.
extern char *getenv ();
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:413: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.
	      posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:757:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, opts)) != -1)
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:974:6:  [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.
	b = getenv(buf);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:623:20:  [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 *rpmenv = getenv("RPM_CONFIGDIR");
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:301:29:  [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 *home_dir = getenv("HOME");
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:821:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *home = getenv("HOME");
data/rpm-4.14.2.1+dfsg1/system.h:41: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.
#define	getenv(_s)	secure_getenv(_s)
data/rpm-4.14.2.1+dfsg1/system.h:43: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.
#define	getenv(_s)	__secure_getenv(_s)
data/rpm-4.14.2.1+dfsg1/tools/rpmdeps.c:103:22:  [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.
    fc = rpmfcCreate(getenv("RPM_BUILD_ROOT"), 0);
data/rpm-4.14.2.1+dfsg1/build/build.c:211:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char sdestr[22];
data/rpm-4.14.2.1+dfsg1/build/expression.c:266: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(temp, p, ts);
data/rpm-4.14.2.1+dfsg1/build/expression.c:271:28:  [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).
      v = valueMakeInteger(atoi(temp));
data/rpm-4.14.2.1+dfsg1/build/expression.c:280: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(temp, p, ts);
data/rpm-4.14.2.1+dfsg1/build/expression.c:294: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(temp, p, ts);
data/rpm-4.14.2.1+dfsg1/build/files.c:460:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	cur->devmajor = atoi(p);
data/rpm-4.14.2.1+dfsg1/build/files.c:476:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	cur->devminor = atoi(p);
data/rpm-4.14.2.1+dfsg1/build/files.c:699: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 lbuf[n + 1];
data/rpm-4.14.2.1+dfsg1/build/files.c:986:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/build/files.c:1328:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[plen + 1];
data/rpm-4.14.2.1+dfsg1/build/files.c:1523: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 * ftsSet[2];
data/rpm-4.14.2.1+dfsg1/build/files.c:1679: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 ltarget[PATH_MAX];
data/rpm-4.14.2.1+dfsg1/build/files.c:1801:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    int fd = open (flp->diskPath, O_RDONLY);
data/rpm-4.14.2.1+dfsg1/build/files.c:1846:15:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
				id_str += sprintf(id_str, "%02x",
data/rpm-4.14.2.1+dfsg1/build/files.c:1935: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 subdir[4];
data/rpm-4.14.2.1+dfsg1/build/files.c:2156: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 *fn, buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/build/files.c:2168: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).
    fd = fopen(fn, "r");
data/rpm-4.14.2.1+dfsg1/build/files.c:2392: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[strlen(*fp) + 1];
data/rpm-4.14.2.1+dfsg1/build/pack.c:108:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/build/pack.c:119:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(fn, "r");
data/rpm-4.14.2.1+dfsg1/build/pack.c:180:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char hostname[1024];
data/rpm-4.14.2.1+dfsg1/build/pack.c:418:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[bufsiz];
data/rpm-4.14.2.1+dfsg1/build/parseChangelog.c:47: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 tz_name[10];               /* name of timezone (if extended format is used) */
data/rpm-4.14.2.1+dfsg1/build/parsePreamble.c:1090: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 lang[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/build/parsePrep.c:232:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char gemnameversion[strlen(sp->source) - 3];
data/rpm-4.14.2.1+dfsg1/build/parseReqs.c:97:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char rel[6], *rp = rel;
data/rpm-4.14.2.1+dfsg1/build/parseSpec.c:315: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).
	ofi->fp = fopen(ofi->fileName, "r");
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:308: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[BUFSIZ+1];
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:1162: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 * const argv[4];
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:137: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).
    int fd = open(lock_path, (O_RDWR|O_CREAT), 0644);
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:497:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	rc = (dbenv->open)(dbenv, dbhome, eflags, rdb->db_perms);
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:871: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).
	    rc = (db->open)(db, NULL, dbi->dbi_file, NULL,
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:1003: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(tdbir, &hdrNum.ui, sizeof(hdrNum.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:1005: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(tdbir, &tagNum.ui, sizeof(tagNum.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:1248:6:  [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(&mi_offset, data.data, sizeof(mi_offset.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:1261: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(data.data, &mi_offset, sizeof(mi_offset.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:1339: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(&mi_offset, dbc->key, sizeof(mi_offset.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.c:117:25:  [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).
    return rdb->db_ops->open(rdb, rpmtag, dbip, flags);
data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.h:115:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char uc[4];
data/rpm-4.14.2.1+dfsg1/lib/backend/dbi.h:244: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).
    int (*open)(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags);
data/rpm-4.14.2.1+dfsg1/lib/backend/dbiset.c:88: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(set->recs + set->count, recs, nrecs * sizeof(*(set->recs)));
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:36:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char t[256];
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:53:29:  [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.
    if (t[0] == '\0') te += sprintf(te, "|0x%x", eflags);
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:60:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char t[256];
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:73:29:  [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.
    if (t[0] == '\0') te += sprintf(te, "|0x%x", oflags);
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:568: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(tdbir, &hdrNum.ui, sizeof(hdrNum.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:570: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(tdbir, &tagNum.ui, sizeof(tagNum.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:815: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(&mi_offset, data.mv_data, sizeof(mi_offset.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/lmdb.c:896: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(&mi_offset, dbc->key, sizeof(mi_offset.ui));
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:233: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).
    nfd = open(idxdb->filename, idxdb->rdonly ? O_RDONLY : O_RDWR, 0);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:344:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[4096];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:492: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(idxdb->key_mapped + idxdb->keyend + hl, key, keyl);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:649:15:  [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).
	nidxdb->fd = mkstemp(nidxdb->filename);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:691: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(nidxdb->key_mapped + keyoff, key, hl + keyl);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:960: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(keylist, arr, nkeylist * sizeof(unsigned int));
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:971: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(data, idxdb->key_mapped, idxdb->keyend);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:1077: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).
    if ((idxdb->fd = open(filename, flags, mode)) == -1) {
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:123:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char header[PKGDB_HEADER_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:161:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char header[PKGDB_HEADER_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:231:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char pagebuf[PAGE_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:413:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[SLOT_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:435:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char page[PAGE_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:453:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[65536];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:532:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[BLOBHEAD_SIZE > BLOBTAIL_SIZE ? BLOBHEAD_SIZE : BLOBTAIL_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:579: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(buf, blob - BLOBTAIL_SIZE, BLOBTAIL_SIZE);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:601:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[65536];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:607:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[(BLOBHEAD_SIZE > BLOBTAIL_SIZE ? BLOBHEAD_SIZE : BLOBTAIL_SIZE) + BLK_SIZE];
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmpkg.c:853: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).
    if ((pkgdb->fd = open(filename, flags, mode)) == -1) {
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmxdb.c:495: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).
    if ((xdb->fd = open(filename, flags, mode)) == -1) {
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:55: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 inode[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:56: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 mode[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:57:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char uid[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:58: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 gid[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:59: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 nlink[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:60: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[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:61: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 filesize[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:62: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 devMajor[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:63: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 devMinor[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:64: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 rdevMajor[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char rdevMinor[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char namesize[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:67: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 checksum[8];			/* ignored !! */
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:74: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 fx[8];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:108:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[num+1], * end;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:126:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[modulo];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:143:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[4];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:162: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(space, "%8.8lx", (unsigned long) (val)); \
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:164: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(phys, space, 8) \
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:181: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(&hdr.nlink, "00000001", 8);
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:182: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(&hdr.namesize, "0000000b", 8);
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:215:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char field[64];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:253: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(hdr->checksum, "00000000", 8);
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:284:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char field[64];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:346: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 magic[6];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:356:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[8*BUFSIZ];
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:406:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[nameSize + 1];
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1032: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(dirname, key, i + 1);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1035: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(basename, key + i + 1, keylen - i - 1);
data/rpm-4.14.2.1+dfsg1/lib/formats.c:100:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/rpm-4.14.2.1+dfsg1/lib/formats.c:334: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 c[2] = " ";
data/rpm-4.14.2.1+dfsg1/lib/formats.c:360: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 dbuf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:433: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 * te, dn[dnlen+1];
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:692:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[8 * BUFSIZ];
data/rpm-4.14.2.1+dfsg1/lib/header.c:23:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const unsigned char rpm_header_magic[8] = {
data/rpm-4.14.2.1+dfsg1/lib/header.c:685: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(pe+1, src, rdl);
data/rpm-4.14.2.1+dfsg1/lib/header.c:686: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(te, src + rdl, rdlen);
data/rpm-4.14.2.1+dfsg1/lib/header.c:694: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(te, stei, entry->info.count);
data/rpm-4.14.2.1+dfsg1/lib/header.c:705: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(pe+1, src + sizeof(*pe), ((ril-1) * sizeof(*pe)));
data/rpm-4.14.2.1+dfsg1/lib/header.c:706: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(te, src + (ril * sizeof(*pe)), rdlen+entry->info.count+drlen);
data/rpm-4.14.2.1+dfsg1/lib/header.c:777:6:  [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(te, entry->data, entry->length);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1121:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    pe = (entryInfo) memcpy(ei + 2, pe, (ril * sizeof(*pe)));
data/rpm-4.14.2.1+dfsg1/lib/header.c:1123:36:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    dataStart = (unsigned char *) memcpy(pe + ril, dataStart, rdl);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1134: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(xmalloc(count), entry->data, count)
data/rpm-4.14.2.1+dfsg1/lib/header.c:1160:6:  [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(t, entry->data, entry->length);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1179:6:  [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(td->data, entry->data, entry->length);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1483: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(t, entry->data, entry->length);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1531:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	const char * charArray[2];
data/rpm-4.14.2.1+dfsg1/lib/header.c:1566:6:  [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(t, table->data, table->length);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1598:6:  [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(t, entry->data, entry->length);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1631: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(t, b, bn);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1633: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(t, string, sn);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1635: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(t, e, en);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1838:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void) memcpy(&trailer, regionEnd, REGION_TAG_COUNT);
data/rpm-4.14.2.1+dfsg1/lib/header.c:2053:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	b = memcpy(xmalloc(bsize), b, bsize);
data/rpm-4.14.2.1+dfsg1/lib/header.h:27:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const unsigned char rpm_header_magic[8];
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:225:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static __thread char errbuf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.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 fmtbuf[strlen(tag->format) + 3];
data/rpm-4.14.2.1+dfsg1/lib/manifest.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 line[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/lib/manifest.c:152:6:  [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(nav + j, av, ac * sizeof(*nav));
data/rpm-4.14.2.1+dfsg1/lib/manifest.c:154:6:  [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(nav + j + ac, argv + next, (argc - next) * sizeof(*nav));
data/rpm-4.14.2.1+dfsg1/lib/order.c:342:6:  [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(sd->SCCs[sd->sccCnt].members, sd->stack + stackIdx,
data/rpm-4.14.2.1+dfsg1/lib/query.c:36:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char sizefield[21];
data/rpm-4.14.2.1+dfsg1/lib/query.c:37:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ownerfield[8+1], groupfield[8+1];
data/rpm-4.14.2.1+dfsg1/lib/query.c:38:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char timefield[100];
data/rpm-4.14.2.1+dfsg1/lib/query.c:333:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    {	unsigned char MD5[16];
data/rpm-4.14.2.1+dfsg1/lib/query.c:450:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char fnbuf[PATH_MAX];
data/rpm-4.14.2.1+dfsg1/lib/query.c:529: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 a[strlen(*arg)+1], *ae;
data/rpm-4.14.2.1+dfsg1/lib/rpmchecksig.c:125:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[4*BUFSIZ];
data/rpm-4.14.2.1+dfsg1/lib/rpmchroot.c:41:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	rootState.cwd = open(".", O_RDONLY);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:843: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 localarg[arglen+1];
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:1099:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256];
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:1280:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256];
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:1940:18:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    char *key = memcpy(xmalloc(keylen + 1), keyp, keylen);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:1950:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    keytd->data = memcpy(xmalloc(keylen), keyp, keylen);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:613:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char t[2] = { tagNToChar(ds->tagN), '\0' };
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:786:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ds->N = memcpy(xmalloc(nb), ods->N, nb);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:791:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	ds->EVR = memcpy(xmalloc(nb), ods->EVR, nb);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:796:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	ds->Flags = memcpy(xmalloc(nb), ods->Flags, nb);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:801:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	ds->ti = memcpy(xmalloc(nb), ods->ti, nb);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:1067:27:  [2] (integer) atol:
  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).
    else if (aE && *aE && atol(aE) > 0) {
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:1072:29:  [2] (integer) atol:
  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).
    } else if (bE && *bE && atol(bE) > 0)
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:997: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[1024];
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1018: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[1024];
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1046: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 buffer[1024];
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1179: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 buffer[1024];
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:2090:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ*4];
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:2280:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ*4];
data/rpm-4.14.2.1+dfsg1/lib/rpmlead.c:34:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char magic[4];
data/rpm-4.14.2.1+dfsg1/lib/rpmlead.c:39:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[66];
data/rpm-4.14.2.1+dfsg1/lib/rpmlead.c:42:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char reserved[16];      /*!< Pad to 96 bytes -- 8 byte aligned! */
data/rpm-4.14.2.1+dfsg1/lib/rpmlock.c:29: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).
	lock->fd = open(lock_path, O_RDWR|O_CREAT, 0644);
data/rpm-4.14.2.1+dfsg1/lib/rpmlock.c:34: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(lock_path, O_RDONLY);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:141:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *current[2];
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:850: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 vendor[16];
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:873:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char vendor[16];
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:900: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 vendor[16];
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:928: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 vendor[16];
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:968: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).
	int fd = open("/proc/self/auxv", O_RDONLY);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1038:6:  [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(un.machine, "ppc");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1040:6:  [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(un.machine, "i386");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1042:6:  [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(un.machine, "x86_64");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1049: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).
	    sprintf(un.sysname, "solaris%1d%s", atoi(un.release)-3,
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1050:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    un.release+1+(atoi(un.release)/10));
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1056: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(un.machine, "i386");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1076:8:  [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(un.machine, "mips64el");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1079:8:  [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(un.machine, "mips64r6el");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1085:8:  [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(un.machine, "mipsel");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1088:8:  [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(un.machine, "mipsr6el");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1097:8:  [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(un.machine, "mips64");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1100:8:  [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(un.machine, "mips64r6");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1106:8:  [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(un.machine, "mips");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1109:8:  [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(un.machine, "mipsr6");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1117:6:  [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(un.machine, "hppa");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1132:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "m68k");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1136:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "m68k");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1140:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "m68k");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1145:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "hppa1.0");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1149:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "hppa1.1");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1153:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "hppa1.2");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1157:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "hppa2.0");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1179:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(un.machine, "sparcv9");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1189:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "sparcv9v");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1191:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "sparc64v");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1204:17:  [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(un.machine, "ppc64p7");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1223:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "armv7hnl");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1225:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		    strcpy(un.machine, "armv7hl");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1229:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(un.machine, "armv6hl");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1236:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(un.machine, "riscv32");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1238:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(un.machine, "riscv64");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1240:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(un.machine, "riscv128");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1255:15:  [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.
	    	case 0: strcpy(un.machine, "alphaev5"); break;
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1256:15:  [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.
	    	case 1: strcpy(un.machine, "alphaev56"); break;
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1257:19:  [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.
	    	case 0x101: strcpy(un.machine, "alphapca56"); break;
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1262:19:  [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.
	    	case 0x303: strcpy(un.machine, "alphaev6"); break;
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1263:19:  [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.
	    	case 0x307: strcpy(un.machine, "alphaev67"); break;
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1275:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	    	strcpy(un.machine, "athlon");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1277:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(un.machine, "pentium4");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1279:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(un.machine, "pentium3");
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:1281:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(un.machine, "geode");
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:122: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).
    cwd = open(".", O_RDONLY);
data/rpm-4.14.2.1+dfsg1/lib/rpmtd.c:431: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(newtd, td, sizeof(*td));
data/rpm-4.14.2.1+dfsg1/lib/rpmtriggers.c:117: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 pfx[keylen + 1];
data/rpm-4.14.2.1+dfsg1/lib/rpmtriggers.c:118: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(pfx, key, keylen);
data/rpm-4.14.2.1+dfsg1/lib/rpmtriggers.c:517: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(pfx, key, keylen);
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:22: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 abuf[strlen(a)+1], bbuf[strlen(b)+1];
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:75: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 mntPoint[PATH_MAX];
data/rpm-4.14.2.1+dfsg1/lib/verify.c:134:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    unsigned char fdigest[diglen];
data/rpm-4.14.2.1+dfsg1/lib/verify.c:150: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 linkto[1024+1];
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:243: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[MYBUFSIZ];
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:300: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[MYBUFSIZ];
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:395:47:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	return pushresult(L, (e==NULL) ? -1 : putenv(memcpy(e,s,l)), s);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:455: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 m[10];
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:543: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 b[L_ctermid];
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:673: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[10];
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:805: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(dynpath);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:835: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).
    r = fd = open("/dev/null", O_WRONLY);
data/rpm-4.14.2.1+dfsg1/luaext/lrexlib.c:43: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 errbuf[sz];
data/rpm-4.14.2.1+dfsg1/luaext/modemuncher.c:103:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char tmp[10];
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:450: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 str[CHAR_CLASS_MAX_LENGTH + 1];
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:522: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 lo[2];
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:523: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 fc[2];
data/rpm-4.14.2.1+dfsg1/misc/fnmatch.c:536:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			    char hi[2];
data/rpm-4.14.2.1+dfsg1/misc/fts.c:74:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#   define __open	open
data/rpm-4.14.2.1+dfsg1/misc/rpmfts.h:144: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 fts_name[1];		/*!< file name */
data/rpm-4.14.2.1+dfsg1/python/rpmarchive-py.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/python/rpmfd-py.c:236:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:292:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:298:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(specfile, "r");
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:344: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 tarbuf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:351:18:  [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).
    (void) close(mkstemp(tmpSpecFile));
data/rpm-4.14.2.1+dfsg1/rpmio/digest_beecrypt.c:54:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx));
data/rpm-4.14.2.1+dfsg1/rpmio/digest_beecrypt.c:55:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	nctx->param = memcpy(xcalloc(1, nctx->paramlen), octx->param, nctx->paramlen);
data/rpm-4.14.2.1+dfsg1/rpmio/digest_beecrypt.c:270: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(bp, hash, hashlen);
data/rpm-4.14.2.1+dfsg1/rpmio/digest_nss.c:107:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx));
data/rpm-4.14.2.1+dfsg1/rpmio/digest_nss.c:248: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(t+ix, p+2, nbytes-ix);
data/rpm-4.14.2.1+dfsg1/rpmio/digest_nss.c:273: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(item->data, p+2, nbytes);
data/rpm-4.14.2.1+dfsg1/rpmio/digest_nss.c:447: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(padded->data + padlen, sig->data, sig->len);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:405: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(mb->buf+mb->tpos, str, len + 1);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:663: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 *d, arg[slen + 1];
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:839: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(scriptbuf, g, gn);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1417:6:  [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(p, b, blen + 1);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1441:6:  [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(p, b, blen + 1);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1446:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	me->name = memcpy(p, n, nlen + 1);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1452:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	me->opts = memcpy(p, o, olen + 1);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1503:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fd = fopen(fn, "r");
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:98: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).
    fdno = open(path, O_RDONLY);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:208: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(digest, dig, diglen);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:222:11:  [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).
    sfd = mkstemp(templ);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:316:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char magic[13];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:116:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    return (char *) memcpy(dest, src, n) + n;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:174:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char onealt[strlen(pattern) - 1];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:176:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:307: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[PATH_MAX];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:403: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).
    fdno = open(path, flags, mode);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:428:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:769:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		threads = atoi(++mode);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1069: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 stdio[32];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1526: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 stdio[20], other[20], zstdio[40];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1566: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 stdio[20], other[20];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1802:8:  [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).
		fd = atoi(entry->d_name);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmkeyring.c:147: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(key->pkt, pkt, pktlen);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmkeyring.c:148: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(key->keyid, keyid, sizeof(keyid));
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c:576: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.
   static char buffer[1024];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c:876:6:  [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(prbuf->buf+prbuf->used, s, sl+1);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:594:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    _digp->hash = memcpy(xmalloc(v->hashlen), &v->sigtype, v->hashlen);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:627:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    _digp->hash = memcpy(xmalloc(_digp->hashlen), v, _digp->hashlen);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:765:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    _digp->userid = memcpy(xmalloc(hlen+1), h, hlen);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:837: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(keyid, (fp + (fplen-8)), 8);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:1160: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(trailer+2, &nb, 4);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmsq.c:83: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(&sig->siginfo, info, sizeof(*info));
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstrpool.c:328:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    t = memcpy(pool->chunks[pool->chunks_size] + pool->chunk_used, s, slen);
data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c:160:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c:230:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    sigtd->data = memcpy(xmalloc(pktlen), pkt, pktlen);;
data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c:245:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.c:39:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char digest[diglen];
data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.c:40:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char signature[MAX_SIGNATURE_LENGTH];
data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.c:71:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char digest[diglen];
data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.c:72:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char signature[MAX_SIGNATURE_LENGTH];
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:113:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char memory[0];
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:827:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *old_str = (char *)debug_sections[DEBUG_STR].data + old_idx;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:846: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 (nname, dest_dir, dest_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:850:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy (nname + dest_len + 1, file, file_len + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:879:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *str = (char *)debug_sections[DEBUG_STR].data + old_idx;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1125:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (ptr, optr, t->unit_length + 4);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1153: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 (ptr, optr, t->opcode_base - 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1171:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		  memcpy (ptr, dest_dir, dest_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1176:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		      memcpy (ptr, file_path, file_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1185:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy (ptr, dir, dir_len + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1208:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		      memcpy (ptr, dest_dir, dest_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1213:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			  memcpy (ptr, file_path, file_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1222:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		  memcpy (ptr, file, file_len + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1243: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 (ptr, optr, remaining);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1353:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      dir_len = strlen ((char *)dirt[value]);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1362: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 (s, file, file_len + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1366: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 (s, dirt[value], dir_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1368: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 (s + dir_len + 1, file, file_len + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1375:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy (s, comp_dir, comp_dir_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1379: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 (p, dirt[value], dir_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1381: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 (p + dir_len + 1, file, file_len + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1530:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			      memcpy (ptr, dest_dir, dest_len);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1549:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		      dir = (char *) debug_sections[DEBUG_STR].data + idx;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1582: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.
		  char *name = (char *) debug_sections[DEBUG_STR].data + idx;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1590:6:  [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 (comp_dir, name, enddir - name);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2488: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((unsigned char *)build_id->d_buf + build_id_offset, digest, build_id_size);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2568: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).
      list_file_fd = open (list_file, O_WRONLY|O_CREAT|O_APPEND, 0644);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2588: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 (file, O_RDWR);
data/rpm-4.14.2.1+dfsg1/tools/elfdeps.c:287: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).
    fdno = open(fn, O_RDONLY);
data/rpm-4.14.2.1+dfsg1/tools/elfdeps.c:387: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 fn[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/tools/rpmdeps.c:77:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/rpm-4.14.2.1+dfsg1/tools/rpmgraph.c:53: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(argv+argc, av, ac * sizeof(*av));
data/rpm-4.14.2.1+dfsg1/tools/sepdebugcrcfix.c:136: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).
  int fd = open (debugname, O_RDONLY);
data/rpm-4.14.2.1+dfsg1/build/expression.c:507: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).
      copy = xmalloc(strlen(v1->data.s) + strlen(v2->data.s) + 1);
data/rpm-4.14.2.1+dfsg1/build/expression.c:507: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).
      copy = xmalloc(strlen(v1->data.s) + strlen(v2->data.s) + 1);
data/rpm-4.14.2.1+dfsg1/build/files.c:337: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).
    for (pe = p; (pe-p) < strlen(name); pe++)
data/rpm-4.14.2.1+dfsg1/build/files.c:416: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).
    for (pe = p; (pe-p) < strlen(name); pe++)
data/rpm-4.14.2.1+dfsg1/build/files.c:518: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).
    for (pe = p; (pe-p) < strlen(name); pe++)
data/rpm-4.14.2.1+dfsg1/build/files.c:653: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).
    for (pe = p; (pe-p) < strlen(name); pe++)
data/rpm-4.14.2.1+dfsg1/build/files.c:738: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).
    for (pe = p; (pe-p) < strlen(name); pe++)
data/rpm-4.14.2.1+dfsg1/build/files.c:800: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).
    for (pe = p; (pe-p) < strlen(name); pe++)
data/rpm-4.14.2.1+dfsg1/build/files.c:921: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).
    k = strlen(fileName);
data/rpm-4.14.2.1+dfsg1/build/files.c:923: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(*dd);
data/rpm-4.14.2.1+dfsg1/build/files.c:1037: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 len = strlen(*postfix_p);
data/rpm-4.14.2.1+dfsg1/build/files.c:1038: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).
		int plen = strlen(cpiopath);
data/rpm-4.14.2.1+dfsg1/build/files.c:1327: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 plen = strlen(diskPath);
data/rpm-4.14.2.1+dfsg1/build/files.c:1792: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).
				 DEBUG_LIB_PREFIX, strlen (DEBUG_LIB_PREFIX)) == 0;
data/rpm-4.14.2.1+dfsg1/build/files.c:1932:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				     strlen (DEBUG_LIB_PREFIX)) == 0;
data/rpm-4.14.2.1+dfsg1/build/files.c:2032: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).
			    int pathlen = strlen(paths[i]);
data/rpm-4.14.2.1+dfsg1/build/files.c:2033: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).
			    int debuglen = strlen(".debug");
data/rpm-4.14.2.1+dfsg1/build/files.c:2034: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).
			    int prefixlen = strlen(DEBUG_LIB_DIR);
data/rpm-4.14.2.1+dfsg1/build/files.c:2035: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).
			    int vralen = vra == NULL ? 0 : strlen(vra);
data/rpm-4.14.2.1+dfsg1/build/files.c:2087: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 fnlen = strlen(fileName);
data/rpm-4.14.2.1+dfsg1/build/files.c:2220: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 (fmt_macro && strlen(fmt_macro) > 0) {
data/rpm-4.14.2.1+dfsg1/build/files.c:2392: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).
	char buf[strlen(*fp) + 1];
data/rpm-4.14.2.1+dfsg1/build/files.c:2512: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).
    fl.buildRootLen = strlen(fl.buildRoot);
data/rpm-4.14.2.1+dfsg1/build/files.c:2773:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rasprintf(&new, "%.*s%s%s", (int)(p - old), old, newsubst, p + strlen(oldsubst));
data/rpm-4.14.2.1+dfsg1/build/files.c:2825: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 buildrootlen = strlen(buildroot);
data/rpm-4.14.2.1+dfsg1/build/files.c:2840: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).
	int namel = strlen(name);
data/rpm-4.14.2.1+dfsg1/build/files.c:2855: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).
		namel = strlen(name);
data/rpm-4.14.2.1+dfsg1/build/files.c:2877: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).
	    pmin = path + buildrootlen + strlen(DEBUG_LIB_DIR);
data/rpm-4.14.2.1+dfsg1/build/misc.c:62: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(s);
data/rpm-4.14.2.1+dfsg1/build/pack.c:187: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 (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
data/rpm-4.14.2.1+dfsg1/build/parseChangelog.c:135:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tz_name, p, (int)(pe-p));
data/rpm-4.14.2.1+dfsg1/build/parsePreamble.c:369: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(tb->name) == (se-s) && rstreqn(tb->name, s, (se-s)))
data/rpm-4.14.2.1+dfsg1/build/parsePreamble.c:804: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 len = strlen(str);
data/rpm-4.14.2.1+dfsg1/build/parsePrep.c:232: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).
	    char gemnameversion[strlen(sp->source) - 3];
data/rpm-4.14.2.1+dfsg1/build/parsePrep.c:234: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).
	    rstrlcpy(gemnameversion, sp->source, strlen(sp->source) - 3);
data/rpm-4.14.2.1+dfsg1/build/parseScript.c:291:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (prog[strlen(prog)-1] != '>') {
data/rpm-4.14.2.1+dfsg1/build/parseSpec.c:101: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 toklen = strlen(token);
data/rpm-4.14.2.1+dfsg1/build/parseSpec.c:218: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).
    spec->lbufSize = strlen(spec->lbuf) + 1;
data/rpm-4.14.2.1+dfsg1/build/parseSpec.c:659: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 srclen = strlen(src);
data/rpm-4.14.2.1+dfsg1/build/policies.c:184: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(bname) > 0) {
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:115: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).
	blen += sizeof("_") - 1 + strlen(s);
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:352:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		iorc = read(fromProg[0], buf, sizeof(buf)-1);
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:428: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).
	buf_stdin_len = strlen(buf_stdin);
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:798: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).
	fc->brlen = strlen(buildRoot);
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:1015: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).
	    bn[strlen(bn)-strlen(".attr")] = '\0';
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:1015: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).
	    bn[strlen(bn)-strlen(".attr")] = '\0';
data/rpm-4.14.2.1+dfsg1/build/rpmfc.c:1074: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 slen = strlen(s);
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:136:22:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode_t oldmask = umask(022);
data/rpm-4.14.2.1+dfsg1/lib/backend/db3.c:138:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(oldmask);
data/rpm-4.14.2.1+dfsg1/lib/backend/ndb/rpmidx.c:647: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).
	nidxdb->filename = xmalloc(strlen(idxdb->filename) + 8);
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:111:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, str, num);
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:118: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).
	*endptr = ((char *)str) + strlen(buf);
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:144:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t left, read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:149:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    cpio->offset += read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:150:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read != left) {
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:250:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(path) + 1;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:345:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:359:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (rpmcpioRead(cpio, &buf, read) != read) {
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:359:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (rpmcpioRead(cpio, &buf, read) != read) {
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:369:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    cpio->offset += read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:370:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read != 6)
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:378:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cpio->offset += read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:379:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read != STRIPPED_PHYS_HDR_SIZE)
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:396:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    cpio->offset += read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:397:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read != PHYS_HDR_SIZE)
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:409:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    cpio->offset += read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:410:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read != nameSize ) {
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:433:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t read, left;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:442:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    cpio->offset += read;
data/rpm-4.14.2.1+dfsg1/lib/cpio.c:443:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read;
data/rpm-4.14.2.1+dfsg1/lib/depends.c:975: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).
    char *ndep = rmalloc(strlen(dep) + 2);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1007: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).
	    fpdep = rmalloc(strlen(dirnames[i]) + strlen(basename) + 1);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1007: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).
	    fpdep = rmalloc(strlen(dirnames[i]) + strlen(basename) + 1);
data/rpm-4.14.2.1+dfsg1/lib/depends.c:1046:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(keystr, key, keylen);
data/rpm-4.14.2.1+dfsg1/lib/formats.c:135: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).
	result = dst = xmalloc(strlen(buf) * 4 + 3);
data/rpm-4.14.2.1+dfsg1/lib/formats.c:326: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 i, s_size = strlen(s);
data/rpm-4.14.2.1+dfsg1/lib/formats.c:392: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(val, "<");
data/rpm-4.14.2.1+dfsg1/lib/formats.c:394: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(val, ">");
data/rpm-4.14.2.1+dfsg1/lib/formats.c:396: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(val, "=");
data/rpm-4.14.2.1+dfsg1/lib/fprint.c:157: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).
	    char *end = cdnbuf + strlen(cdnbuf);
data/rpm-4.14.2.1+dfsg1/lib/fprint.c:162: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).
	    end = cdnbuf + strlen(cdnbuf);
data/rpm-4.14.2.1+dfsg1/lib/fprint.c:404: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(currentsubdir + bnEnd)) {
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:122: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).
	    dnlen = strlen(rpmfilesDN(fi, dil));
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:123: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).
	    bnlen = strlen(rpmfilesBN(fi, i));
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:132: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).
		jlen = strlen(dnl);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:235:21:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t old_umask = umask(0577);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:237:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:432: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).
	size_t dnlen = strlen(dpath);
data/rpm-4.14.2.1+dfsg1/lib/fsm.c:714: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).
	((_x) != NULL && strlen(_x) >= (sizeof("/dev/log")-1) && \
data/rpm-4.14.2.1+dfsg1/lib/header.c:465: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).
		length += strlen(*av++) + 1;
data/rpm-4.14.2.1+dfsg1/lib/header.c:1224: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(td) == (le-l) && rstreqn(td, l, (le - l)))
data/rpm-4.14.2.1+dfsg1/lib/header.c:1292: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).
	     langNum++, t += strlen(t) + 1, ed += strlen(ed) + 1) {
data/rpm-4.14.2.1+dfsg1/lib/header.c:1292: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).
	     langNum++, t += strlen(t) + 1, ed += strlen(ed) + 1) {
data/rpm-4.14.2.1+dfsg1/lib/header.c:1558: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).
	    l += strlen(l) + 1;
data/rpm-4.14.2.1+dfsg1/lib/header.c:1563: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).
	length = strlen(lang) + 1;
data/rpm-4.14.2.1+dfsg1/lib/header.c:1595: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).
	length = strlen(string) + 1 + ghosts;
data/rpm-4.14.2.1+dfsg1/lib/header.c:1605:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memmove(((char *)entry->data) + entry->length + ghosts, string, strlen(string)+1);
data/rpm-4.14.2.1+dfsg1/lib/header.c:1618: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).
	    ee += strlen(ee) + 1;
data/rpm-4.14.2.1+dfsg1/lib/header.c:1625: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).
	sn = strlen(string) + 1;
data/rpm-4.14.2.1+dfsg1/lib/header.c:1639: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).
	entry->length -= strlen(be) + 1;
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:488: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).
	    token->u.string.len = strlen(token->u.string.string);
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:654: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).
	char fmtbuf[strlen(tag->format) + 3];
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:662: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).
    need = strlen(val);
data/rpm-4.14.2.1+dfsg1/lib/headerfmt.c:775: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).
		    need += strlen(tagN);
data/rpm-4.14.2.1+dfsg1/lib/manifest.c:90: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).
	se = s + strlen(s);
data/rpm-4.14.2.1+dfsg1/lib/query.c:257: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).
	sname = tname + strlen("RPMTAG_");
data/rpm-4.14.2.1+dfsg1/lib/query.c:503: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).
	    size_t l = strlen(arg);
data/rpm-4.14.2.1+dfsg1/lib/query.c:529: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).
	char a[strlen(*arg)+1], *ae;
data/rpm-4.14.2.1+dfsg1/lib/query.c:582: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).
		size_t l = strlen(*arg);
data/rpm-4.14.2.1+dfsg1/lib/query.c:608:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (fmt == NULL || strlen(fmt) <= 1) {
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:153: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).
	size_t len = strlen(relocations[i].newPath);
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:183:3:  [1] (buffer) strlen:
  Does not handle 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(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1;
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:183: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).
		strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1;
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:204:5:  [1] (buffer) strlen:
  Does not handle 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(relocations[j].oldPath)
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:230:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    len = strlen(dirNames[j]) - 1;
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:258: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).
		te = fn + strlen(fn);
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:274: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).
	    if (fnlen != strlen(dirNames[j]))
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:303:5:  [1] (buffer) strlen:
  Does not handle 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(relocations[j].oldPath)
data/rpm-4.14.2.1+dfsg1/lib/relocation.c:484: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).
    for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
data/rpm-4.14.2.1+dfsg1/lib/rpmchecksig.c:32: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 marklen = strlen(pgpmark);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:233: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).
		keylen = strlen(keyp);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:259: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).
	    plen = strlen(pfx);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:622:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	dirName = strncpy(xmalloc(len + 1), filespec, len);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:720: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).
	rpmRC rc = indexGet(dbi, name, strlen(name), &matches);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:757: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).
    rc = indexGet(dbi, name, strlen(name), matches);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:854:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(localarg, arg, arglen);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:937: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).
    rpmRC rc = dbiFindByLabelArch(db, dbi, label, strlen(label), NULL, matches);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:1159: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).
	nb = strlen(pattern) + sizeof("^$");
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:1851: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).
	    size = strlen(str);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:2128:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(name + 1, n, nl);
data/rpm-4.14.2.1+dfsg1/lib/rpmdb.c:2179: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).
		rc += idxupdate(dbi, dbc, name, strlen(name), rec);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:380: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 (dspfx)	nb += strlen(dspfx) + 1;
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:381:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (N)	nb += strlen(N);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:392: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).
	nb += strlen(EVR);
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:1371:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (len == strlen(rc->token) && rstreqn(str, rc->token, len))
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:1404: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).
	if (pe - p == strlen(ro->token) && rstreqn(p, ro->token, pe - p)) {
data/rpm-4.14.2.1+dfsg1/lib/rpmds.c:1647:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(right + 1, data->rightstart, n + nl - data->rightstart);
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:406: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 l = strlen(reldn);
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:804: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).
	    sb->st_size = strlen(rpmfilesFLink(fi, ix));
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1036:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return equal;
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:1721: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 plen = strlen(pfx);
data/rpm-4.14.2.1+dfsg1/lib/rpmfi.c:2065: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 len = strlen(lnk);
data/rpm-4.14.2.1+dfsg1/lib/rpmlock.c:28:19:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t oldmask = umask(022);
data/rpm-4.14.2.1+dfsg1/lib/rpmlock.c:30:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	(void) umask(oldmask);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:584: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).
		n = name = xmalloc(strlen(option->name)+2);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:601: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 (rstreqn(ctx->tables[i].key, s, strlen(ctx->tables[i].key)))
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:606: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).
		const char *rest = s + strlen(ctx->tables[i].key);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:678: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).
	    char * t = p + strlen(p);
data/rpm-4.14.2.1+dfsg1/lib/rpmrc.c:976:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while (read(fd, &auxv, sizeof(auxv)) == sizeof(auxv)) {
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:124:19:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t oldmask = umask(0);
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:125:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(oldmask);
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:142:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(oldmask);
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:222: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 slen = strlen(script);
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:331: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 size = strlen(line);
data/rpm-4.14.2.1+dfsg1/lib/rpmscript.c:583: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).
	script->args = xmalloc(2 * sizeof(*script->args) + strlen(prog) + 1);
data/rpm-4.14.2.1+dfsg1/lib/rpmte.c:395: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).
    return (te != NULL ? te->NEVR + strlen(te->name) + 1 : NULL);
data/rpm-4.14.2.1+dfsg1/lib/rpmts.c:185: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 slen = strlen(s);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:39: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).
    thisUnameLen = strlen(thisUname);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:82: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).
    thisGnameLen = strlen(thisGname);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:129: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(pwent->pw_name);
data/rpm-4.14.2.1+dfsg1/lib/rpmug.c:160: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(grent->gr_name);
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:22: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).
    char abuf[strlen(a)+1], bbuf[strlen(b)+1];
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:22: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).
    char abuf[strlen(a)+1], bbuf[strlen(b)+1];
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:95: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).
	    onelen = strlen(one);
data/rpm-4.14.2.1+dfsg1/lib/rpmvercmp.c:96: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).
	    twolen = strlen(two);
data/rpm-4.14.2.1+dfsg1/lib/rpmvs.c:166: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).
	    dlen = strlen(data);
data/rpm-4.14.2.1+dfsg1/lib/tagexts.c:103: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).
	size += strlen(baseNames[i]) + strlen(dirNames[dirIndexes[i]]) + 1;
data/rpm-4.14.2.1+dfsg1/lib/tagexts.c:103: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).
	size += strlen(baseNames[i]) + strlen(dirNames[dirIndexes[i]]) + 1;
data/rpm-4.14.2.1+dfsg1/lib/tagname.c:60: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).
	ret = (strlen(b->name) - strlen(a->name));
data/rpm-4.14.2.1+dfsg1/lib/tagname.c:60: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).
	ret = (strlen(b->name) - strlen(a->name));
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:82:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(mntPoint, dirName, PATH_MAX);
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:746: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).
    bnlen = strlen(bn);
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:748: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).
    dnlen = strlen(dn);
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:752: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(*nsp);
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:923: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).
	dn = rpmfilesDN(files, j); dnlen = strlen(dn) - 1;
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:945:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (strlen(fdn) != dnlen)
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:950:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (strlen(fbn) != bnlen)
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:1547: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).
	    bn[strlen(bn)-strlen(".so")] = '\0';
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:1547: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).
	    bn[strlen(bn)-strlen(".so")] = '\0';
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:1634:22:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode_t oldmask = umask(022);
data/rpm-4.14.2.1+dfsg1/lib/transaction.c:1735:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    (void) umask(oldmask);
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:457:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mode=umask(0));
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:457:13:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mode=umask(0));
data/rpm-4.14.2.1+dfsg1/luaext/lposix.c:467:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(~mode);
data/rpm-4.14.2.1+dfsg1/luaext/userconfig.c:38: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).
    size_t n=strlen(s)-1;
data/rpm-4.14.2.1+dfsg1/misc/fts.c:172:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((len = strlen(*argv)) == 0) {
data/rpm-4.14.2.1+dfsg1/misc/fts.c:256: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(++cp);
data/rpm-4.14.2.1+dfsg1/misc/fts.c:1104:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((len = strlen(*argv)) > max)
data/rpm-4.14.2.1+dfsg1/misc/rpmfts.h:48: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).
# define _D_EXACT_NAMLEN(d) (strlen((d)->d_name))
data/rpm-4.14.2.1+dfsg1/python/rpmmodule.c:235: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).
	shortname = tagname + strlen("RPMTAG_");
data/rpm-4.14.2.1+dfsg1/rpm2archive.c:46:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t len, read;
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:395: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).
    specBase[strlen(specBase)-1] = '\0';
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:408:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask = umask(0));
data/rpm-4.14.2.1+dfsg1/rpmbuild.c:408:15:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask = umask(0));
data/rpm-4.14.2.1+dfsg1/rpmio/argv.c:182: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).
    dest = xmalloc(strlen(str) + 1);
data/rpm-4.14.2.1+dfsg1/rpmio/argv.c:194: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).
    for (c = 0, s = dest; s < t; s+= strlen(s) + 1) {
data/rpm-4.14.2.1+dfsg1/rpmio/argv.c:223: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).
	    argvlen += strlen(*arg);
data/rpm-4.14.2.1+dfsg1/rpmio/argv.c:228: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).
	size_t seplen = (sep != NULL) ? strlen(sep) : 0;
data/rpm-4.14.2.1+dfsg1/rpmio/base64.c:237: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).
	printf("Encoded: %lu\n%s\n", strlen(encoded), encoded);
data/rpm-4.14.2.1+dfsg1/rpmio/digest_beecrypt.c:256:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int datalen = strlen(prefix) / 2 + hashlen;
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:211: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).
	nb = strlen(q);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:400: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).
    size_t len = strlen(str);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:433:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = fgetc(shf)) != EOF) {
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:500:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(b, s, (se - s));
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:502: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).
	be += strlen(b);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.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).
	size_t buflen = strlen(buf);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:995: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).
	b = buf + strlen(buf) + 1;
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1036: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).
	slen = strlen(src);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1038:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(source, src, slen);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1405: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).
    size_t olen = o ? strlen(o) : 0;
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1406: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).
    size_t blen = b ? strlen(b) : 0;
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1436: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 nlen = strlen(n);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1495: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).
    (void) doDefine(mb, macro, strlen(macro), level, 0);
data/rpm-4.14.2.1+dfsg1/rpmio/macro.c:1708: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).
	blen += strlen(s);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:221:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode = umask(0077);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:223:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(mode);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:279: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 (d[strlen(d)-1] != '/') {
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:578: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 plen = strlen(path);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmfileutil.c:579: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 slen = strlen(suffix);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:174: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).
	    char onealt[strlen(pattern) - 1];
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:199: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).
	    rest_len = strlen(++rest) + 1;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:257: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).
	    dirlen = strlen(pattern);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:324: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 home_len = strlen(home_dir);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:358: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 home_len = strlen(home_dir);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:359: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).
		size_t rest_len = end_name == NULL ? 0 : strlen(end_name);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:469: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).
		size_t filename_len = strlen(filename) + 1;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:488: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 dir_len = strlen(dir);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:551: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(pglob->gl_pathv[i]) + 2;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:553: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(&new[len - 2], "/");
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:610: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 dirlen = strlen(dirname);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:618: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).
	size_t eltlen = strlen(array[i]) + 1;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:693: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 patlen = strlen(pattern);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:694: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 dirlen = strlen(directory);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:773: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).
	size_t len = strlen(pattern);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:834: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).
    if (home != NULL && strlen(home) > 0) 
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:859: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 plen = strlen(path);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:882: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).
	    if ((nb = strlen(&(gl.gl_pathv[i][0]))) > maxb)
data/rpm-4.14.2.1+dfsg1/rpmio/rpmglob.c:894:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(globRoot, av[j], nb);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmhook.c:87: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).
    unsigned char *be = bp + strlen(name);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmhook.c:177: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).
    rpmhookArgs args = rpmhookArgsNew(strlen(argt));
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:135:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  fdio_read_function_t		read;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:196: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).
	be += strlen(be);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:370:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read(fps->fdno, buf, count);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1316:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fdio_read_function_t _read = FDIOVEC(fps, read);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1542:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio) - 1);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1542: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).
    strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio) - 1);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1543:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio) - 1);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmio.c:1543: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).
    strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio) - 1);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c:521: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 (luaL_loadbuffer(L, script, strlen(script), name) != 0) {
data/rpm-4.14.2.1+dfsg1/rpmio/rpmlua.c:540: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 (luaL_loadbuffer(L, script, strlen(script), name) != 0) {
data/rpm-4.14.2.1+dfsg1/rpmio/rpmmalloc.c:73: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 size = strlen(str) + 1;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:290: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 vlen = strlen(vs->str);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:1220: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).
	    te = t + strlen(t);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:1240: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).
	    t += strlen(armortype);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:1281: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 (!rstreqn(t, armortype, strlen(armortype)))
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:1284: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).
	    t += strlen(armortype);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmpgp.c:1344:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (armor && strlen(armor) > 0) {
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:105: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).
	size_t dest_size = *dest != NULL ? strlen(*dest) : 0;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:106: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 src_size = strlen(src);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:142: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).
        arg_size += strlen(s);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:145: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).
    dst_size = dst ? strlen(dst) : 0;
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstring.c:151: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).
        size_t size = strlen(s);
data/rpm-4.14.2.1+dfsg1/rpmio/rpmstrpool.c:408: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).
	slen = strlen(pool->offs[sid]);
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:38: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 (!rstreqn(url, us->leadin, strlen(us->leadin)))
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:61: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 (path == NULL) path = url + strlen(url);
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:66: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 (path == NULL) path = url + strlen(url);
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:71: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 (path == NULL) path = url + strlen(url);
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:76: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 (path == NULL) path = url + strlen(url);
data/rpm-4.14.2.1+dfsg1/rpmio/url.c:81: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 (path == NULL) path = url + strlen(url);
data/rpm-4.14.2.1+dfsg1/rpmsign.c:87: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).
	pwd[strlen(pwd) - 1] = '\0';  /* remove newline */
data/rpm-4.14.2.1+dfsg1/rpmsign.c:125: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).
	    memset(fileSigningKeyPassword, 0, strlen(fileSigningKeyPassword));
data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c:50:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode = umask(0077);
data/rpm-4.14.2.1+dfsg1/sign/rpmgensig.c:52:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(mode);
data/rpm-4.14.2.1+dfsg1/sign/rpmsignfiles.c:46: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(fdigest) != diglen * 2)
data/rpm-4.14.2.1+dfsg1/system.h:54: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).
# define NLENGTH(direct) (strlen((direct)->d_name))
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:670: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).
  size_t prefix_len = strlen (dir_prefix);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:833: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 (old_str) + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:838: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 dest_len = strlen (dest_dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:839: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 file_len = strlen (file);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:881: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).
				       str, strlen (str) + 1);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1169: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).
		  size_t dest_len = strlen (dest_dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1170: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).
		  size_t file_len = strlen (file_path);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1184: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).
	      size_t dir_len = strlen (dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1206: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 dest_len = strlen (dest_dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1207: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 file_len = strlen (file_path);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1221: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).
		  size_t file_len = strlen (file);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1258: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).
  size_t comp_dir_len = !comp_dir ? 0 : strlen (comp_dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1296: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).
	      size_t old_size = strlen ((const char *)ptr) + 1;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1297: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).
	      size_t file_len = strlen (file_path);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1298: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).
	      size_t new_size = strlen (dest_dir) + 1;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1337: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).
      file_len = strlen (file);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1345: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).
	      size_t file_len = strlen (file_path);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1346: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).
	      size_t new_size = strlen (dest_dir) + 1;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1353: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).
      dir_len = strlen ((char *)dirt[value]);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1398: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 size = strlen (p) + 1;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1500: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 orig_len = strlen (comp_dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1501: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 dest_len = strlen (dest_dir);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1502: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 file_len = strlen (file);
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:1719: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).
	  size_t size = strlen (p) + 1;
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2424: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).
    rpmDigestUpdate(ctx, build_id_seed, strlen (build_id_seed));
data/rpm-4.14.2.1+dfsg1/tools/debugedit.c:2552: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).
  if (build_id_seed != NULL && strlen (build_id_seed) < 1)
data/rpm-4.14.2.1+dfsg1/tools/elfdeps.c:389:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    fn[strlen(fn)-1] = '\0';
data/rpm-4.14.2.1+dfsg1/tools/rpmdeps.c:93: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).
	    char *be = buf + strlen(buf) - 1;
data/rpm-4.14.2.1+dfsg1/tools/sepdebugcrcfix.c:129: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).
  char *s = reldir + strlen (reldir);

ANALYSIS SUMMARY:

Hits = 752
Lines analyzed = 94786 in approximately 2.25 seconds (42135 lines/second)
Physical Source Lines of Code (SLOC) = 68976
Hits@level = [0] 240 [1] 304 [2] 321 [3]  29 [4]  74 [5]  24
Hits@level+ = [0+] 992 [1+] 752 [2+] 448 [3+] 127 [4+]  98 [5+]  24
Hits/KSLOC@level+ = [0+] 14.3818 [1+] 10.9023 [2+] 6.49501 [3+] 1.84122 [4+] 1.42078 [5+] 0.347947
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.