Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2014-04-05 11:08:16 +0400
committerMike Krüger <mkrueger@xamarin.com>2014-04-05 11:08:16 +0400
commit28d04aec57712fa57da8815172334cba43c92d2c (patch)
treecb5762a381c3017b8b0e596c19faf0fc8bc0ff14 /ICSharpCode.NRefactory
parent22d8bc2b80a956617587c11a82164489b155becd (diff)
Fixed potential blob reader exception.
Diffstat (limited to 'ICSharpCode.NRefactory')
-rw-r--r--ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs
index cc40a520..d446b6ff 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs
@@ -142,9 +142,16 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
return;
}
foreach (var ctorParameter in ctorParameterTypes.Resolve(context)) {
- ResolveResult arg = reader.ReadFixedArg(ctorParameter);
- positionalArguments.Add(arg);
- if (arg.IsError) {
+ ResolveResult arg;
+ bool isError;
+ try {
+ arg = reader.ReadFixedArg (ctorParameter);
+ positionalArguments.Add(arg);
+ isError = arg.IsError;
+ } catch (Exception) {
+ isError = true;
+ }
+ if (isError) {
// After a decoding error, we must stop decoding the blob because
// we might have read too few bytes due to the error.
// Just fill up the remaining arguments with ErrorResolveResult: