D15826: [Balooshow] Avoid out-of-bounds access when accessing corrupt db data

Stefan BrĂ¼ns noreply at phabricator.kde.org
Mon Oct 8 22:20:35 BST 2018


bruns added inline comments.

INLINE COMMENTS

> poboiko wrote in main.cpp:211
> But still, if the term is short (namely, length < 4), we will either won't have "-" (this corresponds to `posOfNonNumeric < 0`, and that's `X<garbage>`), or it will be the last symbol (something like `X1-` - which is `posOfNonNumeric+1 == word.length()`).

but you are not allowed to access `word[2]` if `word.length() < 3`.

> poboiko wrote in main.cpp:218
> On the one hand, you're right. On the other hand, the output should be consistent. Other messages here are translated.

None of the other messages is an error message, but just regular output. Hm, maybe `i18n("Internal Error: %1", message)`.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D15826

To: bruns, #baloo, #frameworks, poboiko
Cc: anthonyfieroni, kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181008/6ca4f5c0/attachment.html>


More information about the Kde-frameworks-devel mailing list