Author: fireball
Date: Tue Jun 17 13:42:20 2008
New Revision: 34001
URL:
http://svn.reactos.org/svn/reactos?rev=34001&view=rev
Log:
Mikhail Zvyozdochkink <mzvyozd(a)narod.ru>
- Limit inputable max partition size to 999999 Mbs.
See issue #3356 for more details.
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Tue Jun 17 13:42:20
2008
@@ -1494,6 +1494,8 @@
#define PARTITION_SIZE_INPUT_FIELD_LENGTH 6
+/* Restriction for MaxSize: pow(10, PARTITION_SIZE_INPUT_FIELD_LENGTH)-1 */
+#define PARTITION_MAXSIZE 999999
static VOID
ShowPartitionSizeInputBox(SHORT Left,
@@ -1692,6 +1694,9 @@
while (TRUE)
{
MaxSize = (PartEntry->UnpartitionedLength + (1 << 19)) >> 20; /*
in MBytes (rounded) */
+
+ if (MaxSize > PARTITION_MAXSIZE) MaxSize = PARTITION_MAXSIZE;
+
ShowPartitionSizeInputBox (12, 14, xScreen - 12, 17, /* left, top, right, bottom
*/
MaxSize, InputBuffer, &Quit, &Cancel);