From 043626d52e34ee8146588bae597513398683e329 Mon Sep 17 00:00:00 2001 From: Kilani Akrich Date: Thu, 28 Sep 2023 17:03:25 +0100 Subject: [PATCH] [PRJ][APPS][USBH] Fix stack corruption due to inconsistent type of local variable in MSC_File_Operations() --- .../USB_Host/DualCore_Standalone/Src/file_operations.c | 2 +- .../USB_Host/DynamicSwitch_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_RTOS/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../USB_Host/DualCore_Standalone/Src/file_operations.c | 2 +- .../USB_Host/DynamicSwitch_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/FWupgrade_Standalone/Src/command.c | 2 +- .../Applications/USB_Host/MSC_RTOS/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../Display/LCD_PicturesFromUSB/Src/file_operations.c | 2 +- .../USB_Host/DynamicSwitch_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_RTOS/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../Display/LCD_PicturesFromUSB/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_RTOS/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_RTOS/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- .../USB_Host/DualCore_Standalone/Src/file_operations.c | 2 +- .../USB_Host/DynamicSwitch_Standalone/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_RTOS/Src/file_operations.c | 2 +- .../Applications/USB_Host/MSC_Standalone/Src/file_operations.c | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Projects/STM32746G-Discovery/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c b/Projects/STM32746G-Discovery/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c index e2b1a44e..001ca685 100644 --- a/Projects/STM32746G-Discovery/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c +++ b/Projects/STM32746G-Discovery/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if (f_mount(&USBH_fatfs, "", 0) != FR_OK) diff --git a/Projects/STM32746G-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c b/Projects/STM32746G-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c index d2f54151..d8037476 100644 --- a/Projects/STM32746G-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c +++ b/Projects/STM32746G-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if (f_mount(&USBH_fatfs, "", 0) != FR_OK) diff --git a/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c b/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c index cda0564d..d153dac0 100644 --- a/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c +++ b/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index 77518ada..1ca8e70b 100644 --- a/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32746G-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32756G_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c b/Projects/STM32756G_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c index 3b1c323b..fdc5e53f 100644 --- a/Projects/STM32756G_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c +++ b/Projects/STM32756G_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if(f_mount(&USBH_fatfs, "", 0) != FR_OK) diff --git a/Projects/STM32756G_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c b/Projects/STM32756G_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c index f7f74883..b2be4def 100644 --- a/Projects/STM32756G_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c +++ b/Projects/STM32756G_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if(f_mount(&USBH_fatfs, "", 0 ) != FR_OK ) diff --git a/Projects/STM32756G_EVAL/Applications/USB_Host/FWupgrade_Standalone/Src/command.c b/Projects/STM32756G_EVAL/Applications/USB_Host/FWupgrade_Standalone/Src/command.c index 7945ed50..23131610 100644 --- a/Projects/STM32756G_EVAL/Applications/USB_Host/FWupgrade_Standalone/Src/command.c +++ b/Projects/STM32756G_EVAL/Applications/USB_Host/FWupgrade_Standalone/Src/command.c @@ -194,7 +194,7 @@ static void COMMAND_ProgramFlashMemory(void) { uint32_t programcounter = 0x00; uint8_t readflag = TRUE; - uint16_t bytesread; + uint32_t bytesread; /* RAM Address Initialization */ RamAddress = (uint32_t) &RAM_Buf; diff --git a/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c b/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c index 7210e25a..d945c625 100644 --- a/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c +++ b/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index b7f60adf..65a7ea01 100644 --- a/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32756G_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F722ZE-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32F722ZE-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index dc1a4e5d..dc4c8c70 100644 --- a/Projects/STM32F722ZE-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32F722ZE-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F723E-Discovery/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c b/Projects/STM32F723E-Discovery/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c index 2ed61adf..97150ccf 100644 --- a/Projects/STM32F723E-Discovery/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c +++ b/Projects/STM32F723E-Discovery/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "Images display from USB Example"; */ void IMG_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F723E-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c b/Projects/STM32F723E-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c index 6d53faf2..d6b66707 100644 --- a/Projects/STM32F723E-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c +++ b/Projects/STM32F723E-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if (f_mount(&USBH_fatfs, "", 0) != FR_OK) diff --git a/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c b/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c index 38d66a4b..b2bb29f1 100644 --- a/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c +++ b/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_RTOS/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index dc1a4e5d..dc4c8c70 100644 --- a/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32F723E-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F7308-DISCO/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c b/Projects/STM32F7308-DISCO/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c index bef86c12..42a37d47 100644 --- a/Projects/STM32F7308-DISCO/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c +++ b/Projects/STM32F7308-DISCO/Applications/Display/LCD_PicturesFromUSB/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "Images display from USB Example"; */ void IMG_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F7308-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c b/Projects/STM32F7308-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c index 3db4a4a9..425a81ad 100644 --- a/Projects/STM32F7308-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c +++ b/Projects/STM32F7308-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F746ZG-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32F746ZG-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index 77518ada..1ca8e70b 100644 --- a/Projects/STM32F746ZG-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32F746ZG-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F7508-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c b/Projects/STM32F7508-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c index eac40756..0eb47b40 100644 --- a/Projects/STM32F7508-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c +++ b/Projects/STM32F7508-DISCO/Applications/USB_Host/MSC_RTOS/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F767ZI-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32F767ZI-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index 77518ada..1ca8e70b 100644 --- a/Projects/STM32F767ZI-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32F767ZI-Nucleo/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F769I-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32F769I-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index a64bc197..723433d6 100644 --- a/Projects/STM32F769I-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32F769I-Discovery/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F769I_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c b/Projects/STM32F769I_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c index 7ff406ff..1076f78f 100644 --- a/Projects/STM32F769I_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c +++ b/Projects/STM32F769I_EVAL/Applications/USB_Host/DualCore_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if(f_mount(&USBH_fatfs, "", 0) != FR_OK) diff --git a/Projects/STM32F769I_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c b/Projects/STM32F769I_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c index 5c837ea2..94b1f992 100644 --- a/Projects/STM32F769I_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c +++ b/Projects/STM32F769I_EVAL/Applications/USB_Host/DynamicSwitch_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; /* Register the file system object to the FatFs module */ if(f_mount(&USBH_fatfs, "", 0 ) != FR_OK ) diff --git a/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c b/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c index d368715b..5b6f97d6 100644 --- a/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c +++ b/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_RTOS/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n"); diff --git a/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c b/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c index a9db4fa7..1264d0fc 100644 --- a/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c +++ b/Projects/STM32F769I_EVAL/Applications/USB_Host/MSC_Standalone/Src/file_operations.c @@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example"; */ void MSC_File_Operations(void) { - uint16_t bytesread; + uint32_t bytesread; LCD_UsrLog("INFO : FatFs Initialized \n");