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/libxml-hash-xs-perl-0.55/src/ppport.h
Examining data/libxml-hash-xs-perl-0.55/src/xh.c
Examining data/libxml-hash-xs-perl-0.55/src/xh.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_buffer.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_buffer.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_buffer_helper.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_config.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_core.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_dom.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_dom.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_encoder.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_encoder.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_h2x.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_h2x.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_h2x_lx.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_h2x_native.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_h2x_native_attr.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_log.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_log.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_param.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_param.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_perl_buffer.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_perl_buffer.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_reader.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_reader.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_sort.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_sort.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_stack.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_stack.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_stash.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_stash.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_string.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_writer.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_writer.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_x2h.c
Examining data/libxml-hash-xs-perl-0.55/src/xh_x2h.h
Examining data/libxml-hash-xs-perl-0.55/src/xh_xml.h

FINAL RESULTS:

data/libxml-hash-xs-perl-0.55/src/ppport.h:6695:14:  [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.
    retval = vsnprintf(buffer, len, format, ap);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6697:14:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    retval = vsprintf(buffer, format, ap);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6726:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buffer, pat, args);
data/libxml-hash-xs-perl-0.55/src/xh_log.c:26:12:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    (void) vfprintf(stderr, msg, args);
data/libxml-hash-xs-perl-0.55/src/xh_string.h:51:33:  [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).
#define xh_strcpy(d, s)         strcpy((char *) (d), (const char *) (s))
data/libxml-hash-xs-perl-0.55/src/ppport.h:3667:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
data/libxml-hash-xs-perl-0.55/src/ppport.h:6550:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		&& (xdigit = strchr((char *) PL_hexdigit, s[1])))
data/libxml-hash-xs-perl-0.55/src/ppport.h:6772: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(dst + used, src, copy);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6801: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(dst, src, copy);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6893: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 octbuf[32] = "%123456789ABCDF";
data/libxml-hash-xs-perl-0.55/src/ppport.h:6963: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 tmp[2];
data/libxml-hash-xs-perl-0.55/src/xh.c:110: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(dst, src, sizeof(xh_opts_t));
data/libxml-hash-xs-perl-0.55/src/xh_buffer_helper.h:8:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(b->cur, s, l);                                              \
data/libxml-hash-xs-perl-0.55/src/xh_log.c:6:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *LOG_LEVEL_NAME[7] = {
data/libxml-hash-xs-perl-0.55/src/xh_reader.c:204: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).
    reader->fd = open((const char *) reader->file, O_RDONLY);
data/libxml-hash-xs-perl-0.55/src/xh_reader.c:283: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).
    reader->fd = open((char *) reader->file, O_RDONLY);
data/libxml-hash-xs-perl-0.55/src/xh_x2h.c:901: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(enc, cur, enc_len);                                      \
data/libxml-hash-xs-perl-0.55/src/ppport.h:5160: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).
  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
data/libxml-hash-xs-perl-0.55/src/ppport.h:5168:59:  [1] (buffer) strlen:
  Does not handle 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 sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/libxml-hash-xs-perl-0.55/src/ppport.h:5172:59:  [1] (buffer) strlen:
  Does not handle 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 sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/libxml-hash-xs-perl-0.55/src/ppport.h:5192: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).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libxml-hash-xs-perl-0.55/src/ppport.h:5220: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).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libxml-hash-xs-perl-0.55/src/ppport.h:5241: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).
     sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/libxml-hash-xs-perl-0.55/src/ppport.h:5263: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).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libxml-hash-xs-perl-0.55/src/ppport.h:5291: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).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libxml-hash-xs-perl-0.55/src/ppport.h:5312: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).
     sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/libxml-hash-xs-perl-0.55/src/ppport.h:5360: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).
#  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
data/libxml-hash-xs-perl-0.55/src/ppport.h:6144: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).
        STRLEN len = strlen(radix);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6728: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).
    return strlen(buffer);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6768: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).
    used = strlen(dst);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6769: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).
    length = strlen(src);
data/libxml-hash-xs-perl-0.55/src/ppport.h:6798: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).
    length = strlen(src);
data/libxml-hash-xs-perl-0.55/src/xh_log.c:27: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 (msg[strlen(msg) - 1] != '\n') {
data/libxml-hash-xs-perl-0.55/src/xh_reader.c:340:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    len = read(reader->fd, main_buf->cur, xh_buffer_avail(main_buf));
data/libxml-hash-xs-perl-0.55/src/xh_reader.c:391:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            src_left = read(reader->fd, xh_buffer_pos(main_buf), xh_buffer_avail(main_buf));
data/libxml-hash-xs-perl-0.55/src/xh_reader.h:36:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t            (*read)            (xh_reader_t *reader, xh_char_t **buf, xh_char_t *preserve, size_t *off);
data/libxml-hash-xs-perl-0.55/src/xh_string.h:50: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).
#define xh_strlen(s)            strlen((const char *) (s))
data/libxml-hash-xs-perl-0.55/src/xh_string.h:52:33:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define xh_strncpy(d, s, n)     strncpy((char *) (d), (const char *) (s), (n))
data/libxml-hash-xs-perl-0.55/src/xh_string.h:80:25:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    return XH_CHAR_CAST strncpy((char *) dest, (const char *) src, n);
data/libxml-hash-xs-perl-0.55/src/xh_string.h:88:25:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    return XH_CHAR_CAST strncpy((char *) dest, (const char *) src, n);
data/libxml-hash-xs-perl-0.55/src/xh_x2h.c:1193:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = reader->read(reader, &buf, preserve, &off);

ANALYSIS SUMMARY:

Hits = 41
Lines analyzed = 13020 in approximately 0.29 seconds (44238 lines/second)
Physical Source Lines of Code (SLOC) = 8121
Hits@level = [0]   2 [1]  24 [2]  12 [3]   0 [4]   5 [5]   0
Hits@level+ = [0+]  43 [1+]  41 [2+]  17 [3+]   5 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 5.29491 [1+] 5.04864 [2+] 2.09334 [3+] 0.615688 [4+] 0.615688 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.