projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f33bd8a
)
Minor fix to avoid ArgumentOutOfRangeException
author
David Schmitt
<david@dasz.at>
Wed, 9 Oct 2013 08:36:37 +0000
(10:36 +0200)
committer
David Schmitt
<david@dasz.at>
Wed, 9 Oct 2013 08:36:37 +0000
(10:36 +0200)
When the file is empty, data[0] would throw and swallow the original exception.
mcs/tools/security/sn.cs
patch
|
blob
|
history
diff --git
a/mcs/tools/security/sn.cs
b/mcs/tools/security/sn.cs
index c84505d30ab9a745dd37c4971c575e1698974969..4f6660077050d007c56f426b49c7265bf1271f60 100644
(file)
--- a/
mcs/tools/security/sn.cs
+++ b/
mcs/tools/security/sn.cs
@@
-126,7
+126,7
@@
namespace Mono.Tools {
return new StrongName (data).RSA;
}
catch {
- if (data [0] != 0x30)
+ if (data
.Length == 0 || data
[0] != 0x30)
throw;
// this could be a PFX file
Console.Write ("Enter password for private key (will be visible when typed): ");