drivers/mtd: Add check for integer overflow#20587
Conversation
| static int _init(mtd_dev_t *dev) | ||
| { | ||
| mtd_emulated_t *mtd = (mtd_emulated_t *)dev; | ||
|
|
There was a problem hiding this comment.
Unrelated change, sneaking it in to make the file happy in uncrustify.
bergzand
left a comment
There was a problem hiding this comment.
Changes look good, thanks for the cleanup
Untested ack from my side
|
Switched from the unsigned buildins to the "you will figure the type out" buildins. |
This means it got larger than what would fit into 16 bit address space, so it needs to be added to Btw.: I get this a lot with the But anyway, bumping |
|
Thanks for looking into it Maribu. I add (via script) the ah maybe I should have put it in an different commit. |
Contribution description
Hei 🦫
Fixes a minor potential for integer overflow.
Testing procedure
CI / good review
Maybe
make -C tests/unittests tests-mtd test