New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security fixes and code cleanups #4055

merged 9 commits into from Jul 24, 2017

clipboard: fix possible invalid memory access

Fix an possible issue found by Sébastien Duquette.
  • Loading branch information...
bmiklautz authored and akallabeth committed Jul 17, 2017
commit f23e10f64b72ad74c3de06343813414bc072f714
@@ -445,7 +445,7 @@ static void* clipboard_synthesize_text_html(wClipboard* clipboard, UINT32 format
beg = atoi(&begStr[10]);
end = atoi(&endStr[8]);
if ((beg > SrcSize) || (end > SrcSize) || (beg >= end))
if (beg < 0 || end < 0 || (beg > SrcSize) || (end > SrcSize) || (beg >= end))
return NULL;
DstSize = end - beg;
ProTip! Use n and p to navigate between commits in a pull request.