mono_get_module_filename (gpointer mod, gunichar2** pstr, guint32* plength)
{
gunichar2* str = NULL;
- guint32 capacity = 32; // tunable
+ guint32 capacity = MAX_PATH; // tunable
guint32 length = 0;
gboolean success = FALSE;
while (TRUE)
{
length = 0;
- capacity *= 2;
if (capacity > (1 << 24))
break;
str = g_new (gunichar2, capacity);
str = NULL;
if (!length) // error
break;
+ capacity *= 2;
}
*pstr = str;
*plength = length;
mono_get_module_filename_ex (gpointer process, gpointer mod, gunichar2** pstr, guint32* plength)
{
gunichar2* str = NULL;
- guint32 capacity = 32; // tunable
+ guint32 capacity = MAX_PATH; // tunable
guint32 length = 0;
gboolean success = FALSE;
while (TRUE)
{
length = 0;
- capacity *= 2;
if (capacity > (1 << 24))
break;
str = g_new (gunichar2, capacity);
str = NULL;
if (!length) // error
break;
+ capacity *= 2;
}
*pstr = str;
*plength = length;
mono_get_module_basename (gpointer process, gpointer mod, gunichar2** pstr, guint32* plength)
{
gunichar2* str = NULL;
- guint32 capacity = 32; // tunable
+ guint32 capacity = MAX_PATH; // tunable
guint32 length = 0;
gboolean success = FALSE;
while (TRUE)
{
length = 0;
- capacity *= 2;
if (capacity > (1 << 24))
break;
str = g_new (gunichar2, capacity);
str = NULL;
if (!length) // error
break;
+ capacity *= 2;
}
*pstr = str;
*plength = length;
mono_get_current_directory (gunichar2** pstr, guint32* plength)
{
gunichar2* str = NULL;
- guint32 capacity = 32; // tunable
+ guint32 capacity = MAX_PATH; // tunable
guint32 length = 0;
gboolean success = FALSE;
while (TRUE)
{
length = 0;
- capacity *= 2;
if (capacity > (1 << 24))
break;
str = g_new (gunichar2, capacity);
str = NULL;
if (!length) // error
break;
+ capacity *= 2;
}
*pstr = str;
*plength = length;