The following issues were found

drivers/bluetooth/dtl1_cs.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		skb_put_u8(s, 0);	/* PAD */

	/* Prepend skb with Nokia frame header and queue */
	memcpy(skb_push(s, NSHL), &nsh, NSHL);
	skb_queue_tail(&(info->txq), s);

	dtl1_write_wakeup(info);

	kfree_skb(skb);

            

Reported by FlawFinder.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.h
1 issues
There is an unknown macro here somewhere. Configuration is required. If MPC_REG_FIELD_LIST is a macro then please configure it.
Error

Line: 253

              };

struct dcn20_mpc_shift {
	MPC_REG_FIELD_LIST_DCN2_0(uint8_t)
};

struct dcn20_mpc_mask {
	MPC_REG_FIELD_LIST_DCN2_0(uint32_t)
};

            

Reported by Cppcheck.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		pps_sdp.hb1 = DC_DP_INFOFRAME_TYPE_PPS;
		pps_sdp.hb2 = 127;
		pps_sdp.hb3 = 0;
		memcpy(&pps_sdp.sb[0], dsc_packed_pps, sizeof(pps_sdp.sb));
		enc2_update_gsp7_128_info_packet(enc1, &pps_sdp);

		/* Enable Generic Stream Packet 7 (GSP) transmission */
		//REG_UPDATE(DP_SEC_CNTL,
		//	DP_SEC_GSP7_ENABLE, 1);

            

Reported by FlawFinder.

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		pps_sdp.hb3 = 0;

		for (i = 0; i < 4; i++) {
			memcpy(pps_sdp.sb, &dsc_packed_pps[i * 32], 32);
			enc1->base.vpg->funcs->update_generic_info_packet(
							enc1->base.vpg,
							11 + i,
							&pps_sdp);
		}

            

Reported by FlawFinder.

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c
1 issues
Uninitialized variable: vlevel
Error

Line: 1903 CWE codes: 908

              		if (vlevel < context->bw_ctx.dml.soc.num_states)
			vlevel = dcn20_validate_apply_pipe_split_flags(dc, context, vlevel, split, merge);
	}
	if (fast_validate || vlevel == context->bw_ctx.dml.soc.num_states ||
			vba->DRAMClockChangeSupport[vlevel][vba->maxMpcComb] == dm_dram_clock_change_unsupported) {
		/*
		 * If mode is unsupported or there's still no p-state support then
		 * fall back to favoring voltage.
		 *

            

Reported by Cppcheck.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c
1 issues
syntax error
Error

Line: 837

              	HWS_SF(, MMHUBBUB_MEM_PWR_CNTL, VGA_MEM_PWR_FORCE, mask_sh)

static const struct dce_hwseq_shift hwseq_shift = {
		HWSEQ_DCN31_MASK_SH_LIST(__SHIFT)
};

static const struct dce_hwseq_mask hwseq_mask = {
		HWSEQ_DCN31_MASK_SH_LIST(_MASK)
};

            

Reported by Cppcheck.

drivers/gpu/drm/amd/display/dc/dm_services.h
1 issues
vsnprintf - If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate
Security

Line: 257 Column: 2 CWE codes: 134
Suggestion: Use a constant for the format specification

               *
 */
#define dm_log_to_buffer(buffer, size, fmt, args)\
	vsnprintf(buffer, size, fmt, args)

static inline unsigned long long dm_get_timestamp(struct dc_context *ctx)
{
	return ktime_get_raw_ns();
}

            

Reported by FlawFinder.

drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		return;
	}

	memcpy(qps, table[index].qps, sizeof(qp_set));
}

static double dsc_roundf(double num)
{
	if (num < 0.0)

            

Reported by FlawFinder.

drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
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: 344 Column: 22 CWE codes: 362

              		return GPIO_RESULT_NON_SPECIFIC_ERROR;
	}

	if (!(*pin)->funcs->open(*pin, mode)) {
		ASSERT_CRITICAL(false);
		dal_gpio_service_close(service, pin);
		return GPIO_RESULT_OPEN_FAILED;
	}


            

Reported by FlawFinder.

drivers/gpu/drm/amd/display/dc/gpio/gpio_service.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 41 Column: 2 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

              	 * Business storage.
	 * one byte For each member of 'enum gpio_id'
	 */
	char *busyness[GPIO_ID_COUNT];
};

enum gpio_result dal_gpio_service_open(
	struct gpio *gpio);


            

Reported by FlawFinder.