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

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-10-11 14:03:06 +0400
committernulltoken <emeric.fermas@gmail.com>2013-10-14 13:09:41 +0400
commit374f2a52500414e2eb6db099bdd1018489fb6a15 (patch)
treec5b174e7927b555c0fee9dc2b096efab0e811dc1 /LibGit2Sharp/Signature.cs
parent8528d4c9478ff88d7dba92840f67dc127277ac94 (diff)
Protect Signature creation from components containing '\0'
Diffstat (limited to 'LibGit2Sharp/Signature.cs')
-rw-r--r--LibGit2Sharp/Signature.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/LibGit2Sharp/Signature.cs b/LibGit2Sharp/Signature.cs
index ae356696..7072a7cf 100644
--- a/LibGit2Sharp/Signature.cs
+++ b/LibGit2Sharp/Signature.cs
@@ -35,6 +35,9 @@ namespace LibGit2Sharp
/// <param name="when">The when.</param>
public Signature(string name, string email, DateTimeOffset when)
{
+ Ensure.ArgumentDoesNotContainZeroByte(name, "name");
+ Ensure.ArgumentDoesNotContainZeroByte(email, "email");
+
this.name = name;
this.email = email;
this.when = when;