Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Mitigate MediaType overflow - #5677

Merged
ryanbrandenburg merged 1 commit into
devfrom
rybrande/MediaTypeOverflow
Jan 13, 2017
Merged

ryanbrandenburg merged 1 commit into
devfrom
rybrande/MediaTypeOverflow

Conversation

@ryanbrandenburg

Copy link
Copy Markdown
Contributor

Fixes #5560 in the same way as e7a24a1f8.


if (offset > mediaType.Length - length)
{
// TODO: This isn't necessarily length's fault but changing this to an ArgumentException with the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎

@ryanbrandenburg
ryanbrandenburg force-pushed the rybrande/MediaTypeOverflow branch from 04d4384 to 3fb2e10 Compare January 12, 2017 00:30
@ryanbrandenburg

Copy link
Copy Markdown
Contributor Author

🆙📅

<comment>0 is the type to configure. 1 is the name of the parameter, configurationType.</comment>
</data>
<data name="Argument_InvalidOffsetLength" xml:space="preserve">
<value>Offset and length are out of bounds for the string or length is greater than the number of characters from index to the end of the string.</value>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should pass in the names of the parameters and surround them with single quotes. Don't put "code names" in resources because they should not be translated.

@ryanbrandenburg

Copy link
Copy Markdown
Contributor Author

🆙📅

<comment>0 is the type to configure. 1 is the name of the parameter, configurationType.</comment>
</data>
<data name="Argument_InvalidOffsetLength" xml:space="preserve">
<value>{0} and {1} are out of bounds for the string.</value>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put single quotes around the parameters to make it clear that you're referring to the parameter by name.

@ryanbrandenburg
ryanbrandenburg force-pushed the rybrande/MediaTypeOverflow branch from a4604d9 to 76a1a46 Compare January 13, 2017 20:50
@ryanbrandenburg
ryanbrandenburg force-pushed the rybrande/MediaTypeOverflow branch from 76a1a46 to 93774a0 Compare January 13, 2017 20:51
@ryanbrandenburg
ryanbrandenburg merged commit 93774a0 into dev Jan 13, 2017
@ryanbrandenburg
ryanbrandenburg deleted the rybrande/MediaTypeOverflow branch January 13, 2017 20:53
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.

3 participants