[PATCH] FIX: buffer overflow on MCI-partition enumeration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Memory for up to 6 partitions is reserved, however there can be up to 7
partitions on an mci storage (e.g. emmc). A user partition two boot par=
titions
and up to four general pupose partitions.
---
 include/mci.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/mci.h b/include/mci.h
index 3bf1455a40..cd01e2f992 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -600,7 +600,10 @@ struct mci=5Fhost {
=20
 #define MMC=5FNUM=5FBOOT=5FPARTITION	2
 #define MMC=5FNUM=5FGP=5FPARTITION	4
-#define MMC=5FNUM=5FPHY=5FPARTITION	6
+#define MMC=5FNUM=5FUSER=5FPARTITION	1
+#define MMC=5FNUM=5FPHY=5FPARTITION	(MMC=5FNUM=5FBOOT=5FPARTITION + \
+                                 MMC=5FNUM=5FGP=5FPARTITION + \
+                                 MMC=5FNUM=5FUSER=5FPARTITION)
=20
 struct mci=5Fpart {
 	struct block=5Fdevice	blk;		/**< the blockdevice for the card */
--=20
2.39.2



------=_=-_OpenGroupware_org_NGMime-40855-1725269876.463860-4--------





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux