Skip to content

Commit 364c30f

Browse files
Fix argument passed to WriteGuidToBuffer (Azure#34908)
* Fix argument passed to WriteGuidToBuffer * Use constant
1 parent a8c942b commit 364c30f

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 7.14.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 7.13.1 (2023-03-13)
84

95
### Bugs Fixed
106

11-
### Other Changes
7+
- Fixed issue with Guid writing during message settlement that could result in an `ArgumentException` if the ArrayPool returned a buffer that is larger than the size of the Guid.
128

139
## 7.13.0 (2023-03-08)
1410

sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpReceiver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ private async Task DisposeMessageAsync(
476476
TimeSpan timeout)
477477
{
478478
byte[] bufferForLockToken = ArrayPool<byte>.Shared.Rent(SizeOfGuidInBytes);
479-
GuidUtilities.WriteGuidToBuffer(lockToken, bufferForLockToken);
479+
GuidUtilities.WriteGuidToBuffer(lockToken, bufferForLockToken.AsSpan(0, SizeOfGuidInBytes));
480480

481481
ArraySegment<byte> deliveryTag = new ArraySegment<byte>(bufferForLockToken, 0, SizeOfGuidInBytes);
482482
ReceivingAmqpLink receiveLink = null;

sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. This client library allows for both sending and receiving messages using Azure Service Bus. For more information about Service Bus, see https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview</Description>
4-
<Version>7.14.0-beta.1</Version>
4+
<Version>7.13.1</Version>
55
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
66
<ApiCompatVersion>7.13.0</ApiCompatVersion>
77
<PackageTags>Azure;Service Bus;ServiceBus;.NET;AMQP;$(PackageCommonTags)</PackageTags>

0 commit comments

Comments
 (0)