<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vcpkg/toolsrc/src/vcpkg-test/stringview.cpp, branch 2019.09</title>
<subtitle>Forked from https://github.com/microsoft/vcpkg</subtitle>
<link rel='alternate' type='text/html' href='https://git.otimperi.dev/vcpkg/'/>
<entry>
<title>[vcpkg] fix bug in StringView::operator== 😱 (#7930)</title>
<updated>2019-08-27T21:03:49+00:00</updated>
<author>
<name>nicole mazzuca</name>
<email>mazzucan@outlook.com</email>
</author>
<published>2019-08-27T21:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.otimperi.dev/vcpkg/commit/?id=32a53e1f3755960b09fc228dce23885aa7efcb8f'/>
<id>32a53e1f3755960b09fc228dce23885aa7efcb8f</id>
<content type='text'>
Before this change, `lhs == rhs` missed the check for
`lhs.size() == rhs.size()`, and then did a `memcmp` on the buffers up to
`lhs.size()`. This means that, if `lhs.size() &lt; rhs.size()`, it would
allow two unequal strings to compare equal if, up to `lhs.size()` they
are the same; and if `lhs.size() &gt; rhs.size()`, then it would read out
of bounds.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change, `lhs == rhs` missed the check for
`lhs.size() == rhs.size()`, and then did a `memcmp` on the buffers up to
`lhs.size()`. This means that, if `lhs.size() &lt; rhs.size()`, it would
allow two unequal strings to compare equal if, up to `lhs.size()` they
are the same; and if `lhs.size() &gt; rhs.size()`, then it would read out
of bounds.</pre>
</div>
</content>
</entry>
</feed>
