The following issues were found
src/third_party/unwind/dist/tests/Gia64-test-readonly.c
1 issues
Line: 36
Column: 7
CWE codes:
134
Suggestion:
Use a constant for the format specification
#include <libunwind.h>
#define panic(args...) \
do { printf (args); ++nerrors; } while (0)
static int verbose;
static int nerrors;
extern void test_func (void (*) (void));
Reported by FlawFinder.
src/third_party/wiredtiger/src/utilities/util_loadtext.c
1 issues
Line: 151
Column: 13
CWE codes:
134
Suggestion:
Use a constant for the format specification
/* Report on progress every 100 inserts. */
if (verbose && ++insert_count % 100 == 0) {
printf("\r\t%s: %" PRIu64, name, insert_count);
fflush(stdout);
}
}
free(key.mem);
free(value.mem);
Reported by FlawFinder.
src/third_party/wiredtiger/src/utilities/util_downgrade.c
1 issues
Line: 27
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_CONNECTION *conn;
WT_DECL_RET;
int ch;
char config_str[128], *release;
release = NULL;
while ((ch = __wt_getopt(progname, argc, argv, "V:")) != EOF)
switch (ch) {
case 'V':
Reported by FlawFinder.
src/third_party/wiredtiger/src/utilities/util.h
1 issues
Line: 39
Column: 38
CWE codes:
134
Suggestion:
Use a constant for the format specification
int util_drop(WT_SESSION *, int, char *[]);
int util_dump(WT_SESSION *, int, char *[]);
int util_err(WT_SESSION *, int, const char *, ...)
WT_GCC_FUNC_DECL_ATTRIBUTE((format(printf, 3, 4)));
int util_flush(WT_SESSION *, const char *);
int util_list(WT_SESSION *, int, char *[]);
int util_load(WT_SESSION *, int, char *[]);
int util_loadtext(WT_SESSION *, int, char *[]);
int util_printlog(WT_SESSION *, int, char *[]);
Reported by FlawFinder.
src/third_party/wiredtiger/src/support/update_vector.c
1 issues
Line: 44
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
WT_ERR(__wt_realloc_def(
updates->session, &updates->allocated_bytes, updates->size + 1, &updates->listp));
if (migrate_from_stack)
memcpy(updates->listp, updates->list, sizeof(updates->list));
}
updates->listp[updates->size++] = upd;
return (0);
err:
Reported by FlawFinder.
src/third_party/unwind/dist/tests/Gia64-test-stack.c
1 issues
Line: 38
Column: 4
CWE codes:
134
Suggestion:
Use a constant for the format specification
#include "ia64-test-stack.h"
#define panic(args...) \
{ printf (args); ++nerrors; }
/* The loadrs field in ar.rsc is 14 bits wide, which limits all ia64
implementations to at most 2048 physical stacked registers
(actually, slightly less than that, because loadrs also counts RNaT
slots). Since we can dirty 95 stacked registers per recursion, we
Reported by FlawFinder.
src/third_party/wiredtiger/src/schema/schema_alter.c
1 issues
Line: 22
Column: 11
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;
char *config, *newconfig;
const char *cfg[4];
newconfig = NULL;
/* Find the URI */
WT_RET(__wt_metadata_search(session, uri, &config));
Reported by FlawFinder.
src/third_party/wiredtiger/src/reconcile/rec_visibility.c
1 issues
Line: 238
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
static inline void
__timestamp_out_of_order_fix(WT_SESSION_IMPL *session, WT_TIME_WINDOW *select_tw)
{
char time_string[WT_TIME_STRING_SIZE];
if (select_tw->stop_ts < select_tw->start_ts ||
(select_tw->stop_ts == select_tw->start_ts && select_tw->stop_txn < select_tw->start_txn)) {
__wt_verbose(session, WT_VERB_TIMESTAMP,
"Warning: fixing out-of-order timestamps remove earlier than value; time window %s",
Reported by FlawFinder.
src/third_party/wiredtiger/src/reconcile/rec_row.c
1 issues
Line: 1005
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
*/
tmpkey->size = key_prefix;
WT_ERR(__wt_buf_grow(session, tmpkey, key_prefix + key_size));
memcpy((uint8_t *)tmpkey->mem + key_prefix, key_data, key_size);
tmpkey->size = key_prefix + key_size;
if (0) {
slow:
WT_ERR(__wt_row_leaf_key_copy(session, page, rip, tmpkey));
Reported by FlawFinder.
src/third_party/unwind/dist/tests/test-static-link-loc.c
1 issues
Line: 81
Column: 5
CWE codes:
134
Suggestion:
Use a constant for the format specification
unw_cursor_t c;
if (verbose)
printf (__FILE__": funcs[0]=%p\n", funcs[0]);
unw_getcontext (&uc);
unw_init_local (&c, &uc);
unw_init_remote (&c, unw_local_addr_space, &uc);
return unw_step (&c);
Reported by FlawFinder.