The following issues were found

src/third_party/unwind/dist/src/tilegx/Gcreate_addr_space.c
1 issues
Memory leak: as
Error

Line: 52 CWE codes: 401

                if (byte_order != 0
      && byte_order != __LITTLE_ENDIAN
      && byte_order != __BIG_ENDIAN)
    return NULL;

  if (byte_order == 0)
    /* use host default: */
    as->big_endian = (__BYTE_ORDER == __BIG_ENDIAN);
  else

            

Reported by Cppcheck.

src/third_party/unwind/dist/src/x86/Ginit.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 90 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              {
  int i, victim;
#ifdef HAVE_MINCORE
  unsigned char mvec[2]; /* Unaligned access may cross page boundary */
#endif
  size_t len;

  if (PAGE_START(addr + sizeof (unw_word_t) - 1) == PAGE_START(addr))
    len = PAGE_SIZE;

            

Reported by FlawFinder.

src/third_party/unwind/dist/src/x86/Gos-linux.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 319 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
  mcontext_t *sc_mcontext = &((ucontext_t*)sc)->uc_mcontext;
  /* Copy in saved uc - all preserved regs are at the start of sigcontext */
  memcpy(sc_mcontext, &c->uc->uc_mcontext,
         DWARF_NUM_PRESERVED_REGS * sizeof(unw_word_t));

  Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
             (unsigned long long) c->dwarf.ip, sc);
  __asm__ __volatile__ ("mov %0, %%esp;"

            

Reported by FlawFinder.

src/third_party/unwind/dist/src/x86_64/Gos-linux.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 143 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
  mcontext_t *sc_mcontext = &((ucontext_t*)sc)->uc_mcontext;
  /* Copy in saved uc - all preserved regs are at the start of sigcontext */
  memcpy(sc_mcontext, &c->uc->uc_mcontext,
         DWARF_NUM_PRESERVED_REGS * sizeof(unw_word_t));

  Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
             (unsigned long long) c->dwarf.ip, sc);
  __asm__ __volatile__ ("mov %0, %%rsp;"

            

Reported by FlawFinder.

src/third_party/wiredtiger/bench/workgen/workgen_int.h
1 issues
usleep - This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified
Security

Line: 61 Column: 9 CWE codes: 676
Suggestion: Use nanosleep(2) or setitimer(2) instead

                  }

    static void sleep(double seconds) {
        usleep(ceil(secs_us(seconds)));
    }

    static uint64_t get_timestamp() {
        uint64_t start_time;
        workgen_clock(&start_time);

            

Reported by FlawFinder.

src/third_party/wiredtiger/test/3rdparty/extras-0.0.3/extras/__init__.py
1 issues
Trailing newlines
Error

Line: 105 Column: 1

                  """
    return getattr(obj, attr, _marker) is not _marker



            

Reported by Pylint.

src/third_party/wiredtiger/test/3rdparty/concurrencytest-0.1.2/setup.py
1 issues
Unused import os
Error

Line: 5 Column: 1

              """setup/install script for concurrencytest"""


import os
from setuptools import setup


setup(
    name='concurrencytest',

            

Reported by Pylint.

src/third_party/wiredtiger/src/utilities/util_write.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  WT_DECL_RET;
    uint64_t recno;
    int ch;
    char *uri, config[100];
    bool append, overwrite, rkey;

    append = overwrite = false;
    uri = NULL;
    while ((ch = __wt_getopt(progname, argc, argv, "ao")) != EOF)

            

Reported by FlawFinder.

src/third_party/wiredtiger/src/utilities/util_verbose.c
1 issues
printf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 50 Column: 13 CWE codes: 134
Suggestion: Use a constant for the format specification

                  WT_UNUSED(handler);
    WT_UNUSED(session);

    return (printf("\r\t%s %-20" PRIu64, operation, progress) < 0 ? EIO : 0);
}

static WT_EVENT_HANDLER __event_handler_verbose = {
  __handle_error_verbose, __handle_message_verbose, __handle_progress_verbose,
  NULL /* Close handler. */

            

Reported by FlawFinder.

src/third_party/wiredtiger/src/utilities/util_printlog.c
1 issues
sscanf - The scanf() family's %s operation, without a limit specification, permits buffer overflows
Security

Line: 54 Column: 22 CWE codes: 120 20
Suggestion: Specify a limit to %s, or use a different input function

                          break;
        case 'l':
            start_str = __wt_optarg;
            n_args = sscanf(start_str, "%" SCNu32 ",%" SCNu32 ",%" SCNu32 ",%" SCNu32,
              &start_lsnfile, &start_lsnoffset, &end_lsnfile, &end_lsnoffset);
            if (n_args == 2) {
                WT_SET_LSN(&start_lsn, start_lsnfile, start_lsnoffset);
                start_set = true;
            } else if (n_args == 4) {

            

Reported by FlawFinder.