Skip to content

Commit f211014

Browse files
authored
SPIFFS: fix unaligned read in HAL (#3261)
Ref. #3065
1 parent 4812cae commit f211014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/spiffs_hal.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int32_t spiffs_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) {
6060
__LINE__, addr, size, alignedBegin, alignedEnd);
6161
return SPIFFS_ERR_INTERNAL;
6262
}
63-
memcpy(dst, &tmp + 4 - nb, nb);
63+
memcpy(dst, ((uint8_t*) &tmp) + 4 - nb, nb);
6464
}
6565

6666
if (alignedEnd != alignedBegin) {

0 commit comments

Comments
 (0)