The following issues were found

src/sparkline.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 144 Column: 37 CWE codes: 126

                              }
                /* Print the label if needed. */
                if (s->label) {
                    int label_len = strlen(s->label);
                    int label_char = row - rows - label_margin_top;

                    if (label_len > label_char) {
                        loop = 1;
                        chars[j] = s->label[label_char];

            

Reported by FlawFinder.

utils/hashtable/rehashing.c
1 issues
srand - This function is not sufficiently random for security-related functions such as key and nonce creation
Security

Line: 105 Column: 5 CWE codes: 327
Suggestion: Use a more secure technique for acquiring random values

              int main(void) {
    dict *d = dictCreate(&dictTypeTest,NULL);
    unsigned long i;
    srand(time(NULL));

    for (i = 0; i < MAX1; i++) {
        dictAdd(d,(void*)i,NULL);
        show(d);
    }

            

Reported by FlawFinder.

src/syncio.c
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 98 Column: 17 CWE codes: 120 20

              
        /* Optimistically try to read before checking if the file descriptor
         * is actually readable. At worst we get EAGAIN. */
        nread = read(fd,ptr,size);
        if (nread == 0) return -1; /* short read. */
        if (nread == -1) {
            if (errno != EAGAIN) return -1;
        } else {
            ptr += nread;

            

Reported by FlawFinder.

deps/jemalloc/src/large.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	}

	size_t copysize = (usize < oldusize) ? usize : oldusize;
	memcpy(ret, extent_addr_get(extent), copysize);
	isdalloct(tsdn, extent_addr_get(extent), oldusize, tcache, NULL, true);
	return ret;
}

/*

            

Reported by FlawFinder.

deps/hiredis/examples/example-ae.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 57 Column: 66 CWE codes: 126

                  redisAeAttach(loop, c);
    redisAsyncSetConnectCallback(c,connectCallback);
    redisAsyncSetDisconnectCallback(c,disconnectCallback);
    redisAsyncCommand(c, NULL, NULL, "SET key %b", argv[argc-1], strlen(argv[argc-1]));
    redisAsyncCommand(c, getCallback, (char*)"end-1", "GET key");
    aeMain(loop);
    return 0;
}


            

Reported by FlawFinder.

src/t_set.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

                      intset *is = o->ptr;
        size_t size = intsetBlobLen(is);
        intset *newis = zmalloc(size);
        memcpy(newis,is,size);
        set = createObject(OBJ_SET, newis);
        set->encoding = OBJ_ENCODING_INTSET;
    } else if (o->encoding == OBJ_ENCODING_HT) {
        set = createSetObject();
        dict *d = o->ptr;

            

Reported by FlawFinder.

deps/jemalloc/src/extent.c
1 issues
syntax error
Error

Line: 278

              }

/* Generate pairing heap functions. */
ph_gen(, extent_heap_, extent_heap_t, extent_t, ph_link, extent_snad_comp)

bool
extents_init(tsdn_t *tsdn, extents_t *extents, extent_state_t state,
    bool delay_coalesce) {
	if (malloc_mutex_init(&extents->mtx, "extents", WITNESS_RANK_EXTENTS,

            

Reported by Cppcheck.

deps/jemalloc/src/ckh.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 543 Column: 12 CWE codes: 126

              
void
ckh_string_hash(const void *key, size_t r_hash[2]) {
	hash(key, strlen((const char *)key), 0x94122f33U, r_hash);
}

bool
ckh_string_keycomp(const void *k1, const void *k2) {
	assert(k1 != NULL);

            

Reported by FlawFinder.

deps/jemalloc/scripts/gen_travis.py
1 issues
inconsistent use of tabs and spaces in indentation (<unknown>, line 103)
Error

Line: 103 Column: 35

                  include_rows += '      env: %s\n' % env_string
    if '-m32' in unusual_combination and os == 'linux':
        include_rows += '      addons:\n'
	include_rows += '        apt:\n'
	include_rows += '          packages:\n'
	include_rows += '            - gcc-multilib\n'

print travis_template % include_rows

            

Reported by Pylint.

deps/jemalloc/scripts/gen_run_tests.py
1 issues
Missing parentheses in call to 'print'. Did you mean print('set -e')? (<unknown>, line 41)
Error

Line: 41 Column: 8

                  'background_thread:true',
]

print 'set -e'
print 'if [ -f Makefile ] ; then make relclean ; fi'
print 'autoconf'
print 'rm -rf run_tests.out'
print 'mkdir run_tests.out'
print 'cd run_tests.out'

            

Reported by Pylint.