This revision was automatically updated to reflect the committed changes.
Closed by commit R287:fd4fb6f596e2: ora:kra: qstrcmp - memcmp (authored by
aacid).
REPOSITORY
R287 KImageFormats
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D20143?vs=55138=55148
REVISION DETAIL
svuorela accepted this revision.
This revision is now accepted and ready to land.
REPOSITORY
R287 KImageFormats
BRANCH
arcpatch-D20143
REVISION DETAIL
https://phabricator.kde.org/D20143
To: aacid, svuorela
Cc: apol, pino, security-team, rempt, kde-frameworks-devel, michaelh, ngraham,
aacid marked 4 inline comments as done.
aacid added inline comments.
INLINE COMMENTS
> apol wrote in kra.cpp:21
> how about calling it s_mimetype?
ny. It happens to be the mimetype, but here we're using it as magic to
detect if the file is a file we care about or not, i'd prefer to keep it
apol added a comment.
+1 otherwise
INLINE COMMENTS
> kra.cpp:21
>
> +static constexpr char s_magic[] = "application/x-krita";
> +static constexpr int s_magic_size = strlen(s_magic);
how about calling it s_mimetype?
REPOSITORY
R287 KImageFormats
REVISION DETAIL
aacid updated this revision to Diff 55138.
aacid added a comment.
use strlen instead of sizeof to not include the trailing \0
REPOSITORY
R287 KImageFormats
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D20143?vs=55137=55138
BRANCH
arcpatch-D20143
REVISION DETAIL
pino added inline comments.
INLINE COMMENTS
> kra.cpp:22
> +static constexpr char s_magic[] = "application/x-krita";
> +static constexpr int s_magic_size = sizeof(s_magic);
> +
this also counts the null terminator (as it is part of the static string)
> kra.cpp:61
> if (device->peek(buff,
aacid added subscribers: rempt, security-team.
REPOSITORY
R287 KImageFormats
REVISION DETAIL
https://phabricator.kde.org/D20143
To: aacid
Cc: security-team, rempt, kde-frameworks-devel, michaelh, ngraham, bruns
aacid created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
aacid requested review of this revision.
REVISION SUMMARY
Makes oss-fuzz happier
REPOSITORY
R287 KImageFormats
BRANCH
master
REVISION DETAIL