Skip to content

useless copying and danger of buffer overflow #8

@nichtgedacht

Description

@nichtgedacht

uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)
{
uint8_t result = USBD_OK;
/* USER CODE BEGIN 8 */
uint16_t i;

for (i=0; i < sizeof(UserTxBufferFS); i++) {
UserTxBufferFS[i] = 0;
}

for (i=0; i < Len; i++) {
UserTxBufferFS[i] = Buf[i];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions