Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Issue - #1

Closed
wants to merge 1 commit into from
Closed

Issue - #1

wants to merge 1 commit into from

Conversation

richamsft
Copy link
Contributor

ImmutableArray.CreateBuilder(-1); throws overflow exception but is expected to throw ArgumentOutOfRangeException.
Fix -
This fix checks the argument "capacity" for valid range such that ArgumentOutOfRangeException is thrown instead.
Also, added a testcase for this scenario.

ImmutableArray.CreateBuilder<int>(-1); throws overflow exception but is expected to throw ArgumentOutOfRangeException.
Fix -
This fix checks the argument "capacity" for valid range such that ArgumentOutOfRangeException is thrown instead.
Also, added a testcase for this scenario.
@nguerrera
Copy link
Contributor

👍 Looks good to me.

@joshfree
Copy link
Member

ship it

@FiveTimesTheFun
Copy link
Contributor

Looks good to me too - thanks Richa!

Please don't merge yet, I'm going to update the reference to the build tools version and commit that first.

@FiveTimesTheFun
Copy link
Contributor

Thanks Richa! I've rebased and merged.

chcosta added a commit that referenced this pull request Jan 14, 2015
--mirror-- Mirror sync - Implementation of AsyncStreamReader stored the ...
FiveTimesTheFun pushed a commit to FiveTimesTheFun/corefx that referenced this pull request May 21, 2015
pgavlin pushed a commit to pgavlin/corefx that referenced this pull request Aug 6, 2015
Merge corefx/master into sn2.
stephentoub pushed a commit that referenced this pull request Nov 18, 2016
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
krwq referenced this pull request in krwq/corefx Mar 2, 2017
krwq added a commit that referenced this pull request Mar 7, 2017
Fix concurrency issues by removing file access
stephentoub added a commit that referenced this pull request Jun 1, 2017
Remove dead code from System.ComonentModel.TypeConverter for issue #1
Olafski pushed a commit to Olafski/corefx that referenced this pull request Jun 15, 2017
Olafski pushed a commit to Olafski/corefx that referenced this pull request Jun 15, 2017
Add Docker Image Tags to RC4 download Table
stephentoub referenced this pull request in stephentoub/corefx Jul 6, 2017
The following code throws an exception, caused by incorrect logic in BufferedStream.ReadByteSlow():

            byte[] input = new byte[] { 1, 2 };
            using (var reader = new BufferedStream(new MemoryStream(input), 2))
            {
                reader.ReadByte();
                reader.ReadByte();
                reader.ReadByte();

                byte[] mybuffer = new byte[10];
                reader.Read(mybuffer, 0, 1);   // throws System.ArgumentOutOfRangeException: 'Non-negative number required.'
            }

When the input data is exhausted through a sequence of ReadByte() calls, ReadByteSlow() does not reset _readPos to zero.
This causes a break in the contract specified in Read() - because because _readLen - _readPos is negative.
Then the block copy fails because the count to copy is negative.
Fix is to reset _readPos to zero before returning -1.
OmarTawfik pushed a commit that referenced this pull request Feb 13, 2018
#26744)

* Added tests for Microsoft.VisualBasic.CompilerServices.Conversions #14344

* added tests for ToBoolean fro Object
A-And pushed a commit to A-And/corefx that referenced this pull request Feb 21, 2018
…tnet#1… (dotnet#26744)

* Added tests for Microsoft.VisualBasic.CompilerServices.Conversions #14344

* added tests for ToBoolean fro Object
pjanotti pushed a commit to pjanotti/corefx that referenced this pull request Feb 26, 2018
pjanotti pushed a commit that referenced this pull request Feb 27, 2018
* NamedPipe: CurrentUserOnly, quick fixes for Unix

* The path for the directory of when using current user only was wrong and not using the intended folder.
* Added getpeerid validation on the server side.

* Clean some dirty changes used for quick validation.

* PR feedback round #1
danmoseley referenced this pull request in danmoseley/corefx Sep 3, 2018
danmoseley added a commit that referenced this pull request Sep 4, 2018
* Fix ServiceController name population perf

* Split tests

* Remove dead field

* Remove new use of DangerousGetHandle

* SafeHandle all the things!

* VSB #1

* VSB #2

* Fix GLE

* Initialize machineName in ctor

* Test for empty name ex

* Null names

* Inadvertent edit

* Unix build

* Move interop into class

* Reverse SafeHandle for HAllocGlobal

* Fix tests

* Disable test for NETFX

* CR feedback

* Pattern matching on VSB

* Direct call

* typo
carlossanlop pushed a commit that referenced this pull request Mar 5, 2019
filipnavara pushed a commit to filipnavara/corefx that referenced this pull request May 22, 2019
fix CopyToAsyncCore - cancellation and infinite loop
ghost pushed a commit that referenced this pull request Aug 9, 2019
* Json prototype (#1)

Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.

* Json prototype - transformation API  (#2)

* transformation API added
* assertions to existing scenarios added

* Json prototype (#1)

Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.

* Json prototype - transformation API  (#2)

* transformation API added
* assertions to existing scenarios added

* JsonNumber implementation and tests (#3)

* IEquatables added
* JsonNumber implementation and unit tests added
* pragmas deleted
* review comments included, more tests added
* decimal support added to JsonNumber
* decimal support added to JsonArray and JsonObject

* all unimplemented classes and methods with accompanying tests removed

* First part of documentation added

* documentation completed

* missing exceptions added

* JsonElement changes removed

* part of the review comments included

* work on review comments

* code refactor

* more decimal tests added using MemberData

* more decimal tests added using MemberData

* more test cases added

* equals summary adjusted, equals tests added

* more Equals tests added, GetHashCode tests added, minor changes

* scientifing notation support added, rational numbers tests fixes

* rational overflow tests added

* ulong maxvalue tests added to rational types

* presision problems fixes

* exception strings fixed

* CI failing fixes (hopefully), review comments included

* missing == tests added to achieve 100% branch coverage

* review comments included

* trailing whitespaces fixes

* equals comments added

* equals object refactored to call quals json number

* merge fix
akrisiun added a commit to akrisiun/corefx that referenced this pull request Sep 8, 2019
akrisiun added a commit to akrisiun/corefx that referenced this pull request Sep 29, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…tests

Implement DsaKeyValue.LoadXml

Commit migrated from dotnet/corefx@d2e4569
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…fixing-tests-1

Fix concurrency issues by removing file access

Commit migrated from dotnet/corefx@e5b43ed
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…/corefx#1)

The following code throws an exception, caused by incorrect logic in BufferedStream.ReadByteSlow():

            byte[] input = new byte[] { 1, 2 };
            using (var reader = new BufferedStream(new MemoryStream(input), 2))
            {
                reader.ReadByte();
                reader.ReadByte();
                reader.ReadByte();

                byte[] mybuffer = new byte[10];
                reader.Read(mybuffer, 0, 1);   // throws System.ArgumentOutOfRangeException: 'Non-negative number required.'
            }

When the input data is exhausted through a sequence of ReadByte() calls, ReadByteSlow() does not reset _readPos to zero.
This causes a break in the contract specified in Read() - because because _readLen - _readPos is negative.
Then the block copy fails because the count to copy is negative.
Fix is to reset _readPos to zero before returning -1.

Commit migrated from dotnet/corefx@2fec396
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…tnet/corefx#1… (dotnet/corefx#26744)

* Added tests for Microsoft.VisualBasic.CompilerServices.Conversions dotnet/corefx#14344

* added tests for ToBoolean fro Object


Commit migrated from dotnet/corefx@c705032
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* NamedPipe: CurrentUserOnly, quick fixes for Unix

* The path for the directory of when using current user only was wrong and not using the intended folder.
* Added getpeerid validation on the server side.

* Clean some dirty changes used for quick validation.

* PR feedback round dotnet/corefx#1


Commit migrated from dotnet/corefx@5c7137c
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Fix ServiceController name population perf

* Split tests

* Remove dead field

* Remove new use of DangerousGetHandle

* SafeHandle all the things!

* VSB dotnet/corefx#1

* VSB dotnet/corefx#2

* Fix GLE

* Initialize machineName in ctor

* Test for empty name ex

* Null names

* Inadvertent edit

* Unix build

* Move interop into class

* Reverse SafeHandle for HAllocGlobal

* Fix tests

* Disable test for NETFX

* CR feedback

* Pattern matching on VSB

* Direct call

* typo


Commit migrated from dotnet/corefx@76c8587
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…x#39917)

* Json prototype (dotnet/corefx#1)

Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.

* Json prototype - transformation API  (dotnet/corefx#2)

* transformation API added
* assertions to existing scenarios added

* Json prototype (dotnet/corefx#1)

Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.

* Json prototype - transformation API  (dotnet/corefx#2)

* transformation API added
* assertions to existing scenarios added

* JsonNumber implementation and tests (dotnet/corefx#3)

* IEquatables added
* JsonNumber implementation and unit tests added
* pragmas deleted
* review comments included, more tests added
* decimal support added to JsonNumber
* decimal support added to JsonArray and JsonObject

* all unimplemented classes and methods with accompanying tests removed

* First part of documentation added

* documentation completed

* missing exceptions added

* JsonElement changes removed

* part of the review comments included

* work on review comments

* code refactor

* more decimal tests added using MemberData

* more decimal tests added using MemberData

* more test cases added

* equals summary adjusted, equals tests added

* more Equals tests added, GetHashCode tests added, minor changes

* scientifing notation support added, rational numbers tests fixes

* rational overflow tests added

* ulong maxvalue tests added to rational types

* presision problems fixes

* exception strings fixed

* CI failing fixes (hopefully), review comments included

* missing == tests added to achieve 100% branch coverage

* review comments included

* trailing whitespaces fixes

* equals comments added

* equals object refactored to call quals json number

* merge fix


Commit migrated from dotnet/corefx@5050ee8
carlossanlop pushed a commit that referenced this pull request Sep 13, 2022
…api_krb5.so while using Net6 (#43133)

* Shims for Kerberos Authentication on Unix

* Move SqlClient fix for .NET 6+ compatibility into SqlClient-only file (#1)

* Adding OOB for System.Data.SqlClient

* Addressing review comments

Co-authored-by: David Engel <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants