The following issues were found

src/mongo/watchdog/watchdog.cpp
1 issues
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?
Security

Line: 467 Column: 14 CWE codes: 362

                  Date_t now = opCtx->getServiceContext()->getPreciseClockSource()->now();
    std::string nowStr = now.toString();

    int fd = open(file.generic_string().c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
    if (fd == -1) {
        auto err = errno;
        LOGV2_FATAL_CONTINUE(
            23424,
            "open failed for '{file_generic_string}' with error: {errnoWithDescription_err}",

            

Reported by FlawFinder.

src/mongo/watchdog/watchdog_test.cpp
1 issues
syntax error
Error

Line: 105

              // 4. Make sure the period can be changed like from 1 minute -> 1 milli

// Positive: Make sure periodic thread runs at least N times and stops correctly
TEST_F(PeriodicThreadTest, Basic) {

    TestPeriodicThread testThread(Milliseconds(5));

    testThread.setSignalOnCount(5);


            

Reported by Cppcheck.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_erf.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If IF_IEEE is a macro then please configure it.
Error

Line: 995

                  IF_VAX( s_exp_word = _u_.F_HI_WORD;
            s_exp_word = SIGN_EXTENDED_PDP_SHUFFLE(s_exp_word);)

    IF_IEEE(if (HAS_ABNORMAL_EXP(s_exp_word)) goto ieee_abnormal_arguments;)

    /* Get "|x|" and branch to the right code for the size of x */
    exp_word = s_exp_word & (~(-_F_SIGN_BIT_MASK));

    if (exp_word > MAX_POLY_ARG)

            

Reported by Cppcheck.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_error_codes.c
1 issues
failed to expand 'DEFAULT_NO_ERROR', Invalid ## usage when expanding 'DEFAULT_NO_ERROR'.
Error

Line: 106

              
#define DEFAULT_RESPONSE(a,b,c) DEFINE_RESPONSE(a,b,c,default_fast_ret[c], \
                                          c,default_ieee_ret[c])
#define DEFAULT_NO_ERROR(a,b,c) DEFINE_RESPONSE(a,b,DPML_NO_ERROR, c ## _INDEX,\
                                          DPML_NO_ERROR, c ## _INDEX);
#define DEFAULT_NAN(a,b) DEFINE_RESPONSE(a,b,DPML_NO_ERROR, POS_ZERO_INDEX,\
                                           DPML_NO_ERROR, NAN_INDEX);

#include "dpml_private.h"

            

Reported by Cppcheck.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_exp.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If IF_IEEE is a macro then please configure it.
Error

Line: 515

                      */

    
        IF_IEEE(
            /* Screen out NaN's and Inf's */    
            if (m >= F_EXP_MASK) goto NaN_or_Inf;
            )
    
        /* If argument is tiny (including denorms and zero) just return 1. */

            

Reported by Cppcheck.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_expm1.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If IF_IEEE is a macro then please configure it.
Error

Line: 470

                  ** Start by weeding out NaN and infinities
    */

    IF_IEEE(
        /* Screen out NaN's and Inf's */    
        if (m >= F_EXP_MASK) goto NaN_or_Inf;
        )

    /*

            

Reported by Cppcheck.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_log.c
1 issues
printf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 945 Column: 4 CWE codes: 134
Suggestion: Use a constant for the format specification

                 printf("\n#include \"dpml_private.h\"\n\n");
#endif

   printf("\n#define LOG_TABLE_NAME "STR(LOG_TABLE_NAME));
   printf("\n#define TABLE_CONST  %i\n\n", LOG_K);

#if ONE_PATH
   printf("\n#define DO_ONE_PATH 1\n");
#endif

            

Reported by FlawFinder.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_names.h
1 issues
random - This function is not sufficiently random for security-related functions such as key and nonce creation
Security

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

              #endif

#ifndef RANDOM_BASE_NAME
#    define RANDOM_BASE_NAME  random
#endif

#ifndef RINT_BASE_NAME
#    define RINT_BASE_NAME  rint
#endif

            

Reported by FlawFinder.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_pow_cons.c
1 issues
printf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 439 Column: 3 CWE codes: 134
Suggestion: Use a constant for the format specification

              #       define POW2_INDEX_POS		(__LOG2(BITS_PER_B_TYPE) - 3)

#       define PRINT_POW2_TABLE_ENTRY(j, Pj)				\
		printf( "\t/* %4i */ %#.4" STR(B_CHAR), ", /* %3i */",	\
		   BYTES(MP_BIT_OFFSET), Pj, j);			\
		MP_BIT_OFFSET += BITS_PER_B_TYPE

#   else /* USE_BACKUP */


            

Reported by FlawFinder.

src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_cons.c
1 issues
syntax error
Error

Line: 44

              		printf("ENUM#   define " name "\t%i\n", index);	\
		print_table_entries(value); index++

@divert -append divertText

#   include "mphoc_functions.h"

    procedure print_table_entries (value)
        {

            

Reported by Cppcheck.