Check index before access (dotnet/coreclr#7795)
authorDmitry-Me <Dmitry-Me@users.noreply.github.com>
Tue, 25 Oct 2016 17:02:55 +0000 (20:02 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 25 Oct 2016 17:02:55 +0000 (19:02 +0200)
Commit migrated from https://github.com/dotnet/coreclr/commit/e9e1eb2666d4f79d8d02168375219426460c2bae

src/coreclr/src/ToolBox/SOS/Strike/sildasm.cpp

index 6bd3bb4..911ff09 100644 (file)
@@ -789,7 +789,7 @@ PCCOR_SIGNATURE PrettyPrintType(
                         {   
                             //if (sizes[i] != 0 || lowerBounds[i] != 0)   
                             {   
-                                if (lowerBounds[i] == 0 && i < numSizes)    
+                                if (i < numSizes && lowerBounds[i] == 0)
                                     appendStrNum(out, sizes[i]);    
                                 else    
                                 {