flatpakpermission: Make sure editPerm() cannot access out of bounds
Access out of bounds is possible if the value of index is equal to m_permissions.length().
(cherry picked from commit 61b67751)
Access out of bounds is possible if the value of index is equal to m_permissions.length().
(cherry picked from commit 61b67751)