Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Prevent index out of array bounds exception #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mason-mcglothlin
Copy link

Convert short to int because we were overflowing the value and this was causing and index out of bounds exception when accessing an array. Eliminated unnecessary cast.

We are using EPPlus to generate an Excel report in our application. We were getting an index out of range exception when a particularly large report was coming through. We traced this down to an unnecessary cast of an index value to a short. Changing it to an int solved our problem.

I'm struggling to create an easily reproducible example of the error that I can share with you - the report that we generate contains Protected Health Information, and trying to create a simple example with canned fake data isn't appearing so fruitful at the moment. But I did verify that once we changed from short to int that it resolved our issue.

Convert short to int because we were overflowing the value and this was causing and index out of bounds exception when accessing an array. Eliminated unnecessary cast
@mason-mcglothlin
Copy link
Author

@SachieKang I appreciate the review. Any idea when this might be merged and then pushed to nuget.org? Our company relies on EPPlus for generating some reports and we're trying to decide whether we need to temporarily fork EPPlus or if we can hold out for an official release. Knowing the timing would be helpful for our decision making.

@mason-mcglothlin
Copy link
Author

Any updates on when this might get merged + released?

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.

2 participants