You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -82,12 +82,18 @@ namespace Mono.Unix
|
||||
uep.filename = "";
|
||||
return uep;
|
||||
}
|
||||
byte [] bytes = new byte [socketAddress.Size - 2 - 1];
|
||||
int size = socketAddress.Size - 2;
|
||||
byte [] bytes = new byte [size];
|
||||
for (int i = 0; i < bytes.Length; i++) {
|
||||
bytes [i] = socketAddress [i + 2];
|
||||
// There may be junk after the null terminator, so ignore it all.
|
||||
if (bytes [i] == 0) {
|
||||
size = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string name = Encoding.Default.GetString (bytes);
|
||||
string name = Encoding.Default.GetString (bytes, 0, size);
|
||||
return new UnixEndPoint (name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user