[riot-notifications] [RIOT-OS/RIOT] drivers/mtd: Prevent potential heap overflow (#16816)

Nils Ollrogge notifications at github.com
Tue Sep 7 09:19:50 CEST 2021


@Ollrogge commented on this pull request.



>      const uint32_t sector_size = mtd->pages_per_sector * mtd->page_size;
 
     /* copy sector to RAM */
-    res = mtd_read_page(mtd, work, sector_page, 0, sector_size);
+    res = mtd_read_page(mtd, work, page, 0, sector_size);

Ah there you go :P stupid mistake. Thanks ! Will revert this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16816#discussion_r703245600
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210907/7be80d5e/attachment.htm>


More information about the notifications mailing list