Skip to content

Commit 57c7b8f

Browse files
committed
fix: use byte for procedure name length in RPC payload to resolve misalignment
1 parent 06fec72 commit 57c7b8f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<Authors>vkuttyp</Authors>
88
<PackageLicenseExpression>MIT</PackageLicenseExpression>
99
<RepositoryUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</RepositoryUrl>
10-
<Version>1.9.9</Version>
10+
<Version>1.9.10</Version>
1111
</PropertyGroup>
1212
</Project>

src/CosmoSQLClient.MsSql/MsSqlConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ private byte[] BuildProcRpcPayload(string procName, IReadOnlyList<SqlParameter>
486486
using var ms = new MemoryStream();
487487
using var bw = new BinaryWriter(ms, Encoding.Unicode);
488488
WriteAllHeaders(bw, _transactionDescriptor);
489-
bw.Write((ushort)procName.Length);
489+
bw.Write((byte)procName.Length);
490490
bw.Write(Encoding.Unicode.GetBytes(procName));
491491
bw.Write((ushort)0);
492492
foreach (var p in parameters) WriteNamedParam(bw, p.Name, p.Value, p.Direction != SqlParameterDirection.Input);

0 commit comments

Comments
 (0)