<table><tr><td style="">kdudka added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17816">View Revision</a></tr></table><br /><div><div><p>I am fine with kio implementing things differently as long as the basic functionality keeps working.  I used to use Krusader to get images out of my camera and it simply stopped working for me with no obvious indication of what went wrong.  This code tries to implement some advanced error handling, yet it is written in a way that it passed a review with a fundamental programming mistake in the basic error handling.</p>

<p>The fix proposed in <a href="https://phabricator.kde.org/D17816#677448" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D17816#677448</a> is incomplete, as I understand it.  If we break the loop with <tt style="background: #ebebeb; font-size: 13px;">valuelen == -1</tt>, the value will be passed as <tt style="background: #ebebeb; font-size: 13px;">size_t</tt> to the <tt style="background: #ebebeb; font-size: 13px;">size</tt> argument of <tt style="background: #ebebeb; font-size: 13px;">fsetxattr()</tt>, which may lead to reading <tt style="background: #ebebeb; font-size: 13px;">value.constData()</tt> out of bounds.</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17816">https://phabricator.kde.org/D17816</a></div></div><br /><div><strong>To: </strong>arrowd, dfaure, chinmoyr, bruns, Frameworks, tmarshall, usta, cochise<br /><strong>Cc: </strong>kdudka, usta, scheirle, tmarshall, arrowd, cfeck, bruns, phidrho, dhaumann, funkybomber, abika, pino, davidedmundson, ngraham, atha.kane, spoorun, nicolasfella, kde-frameworks-devel, LeGast00n, cblack, michaelh<br /></div>