/* Check if we can abuse the TEB */
if (AnsiString.MaximumLength > 260)
{
+RosHack:
/* We can't, allocate a new string */
AtomNameString = &UnicodeString;
Status = RtlAnsiStringToUnicodeString(AtomNameString,
}
else
{
- /* We can! Use the TEB */
+ /* We can! Get the TEB String */
AtomNameString = &NtCurrentTeb()->StaticUnicodeString;
+
+ /* FIXME: HACK! */
+ if (!AtomNameString->MaximumLength)
+ {
+ DPRINT1("Hit the ROS TEB Static Unicode String Bug\n",
+ "Please try to fix the underlying problem!!!\n");
+ goto RosHack;
+ }
+
+ /* Convert it into the TEB */
Status = RtlAnsiStringToUnicodeString(AtomNameString,
&AnsiString,
FALSE);
/* Check if we can abuse the TEB */
if (AnsiString.MaximumLength > 260)
{
+RosHack:
/* We can't, allocate a new string */
AtomNameString = &UnicodeString;
Status = RtlAnsiStringToUnicodeString(AtomNameString,
}
else
{
- /* We can! Use the TEB */
+ /* We can! Get the TEB String */
AtomNameString = &NtCurrentTeb()->StaticUnicodeString;
+
+ /* FIXME: HACK! */
+ if (!AtomNameString->MaximumLength)
+ {
+ DPRINT1("Hit the ROS TEB Static Unicode String Bug\n",
+ "Please try to fix the underlying problem!!!\n");
+ goto RosHack;
+ }
+
+ /* Convert it into the TEB */
Status = RtlAnsiStringToUnicodeString(AtomNameString,
&AnsiString,
FALSE);