Patrick Ohly changed bug 90118
What Removed Added
Status ASSIGNED RESOLVED
Resolution --- FIXED

Comment # 6 on bug 90118 from
Included the following patch in the upcoming 1.5.1:

commit a5f0139a1070cdde4ec45781059d8703d0341381
Author: Patrick Ohly <patrick.ohly@intel.com>
Date:   Mon Jun 1 15:05:16 2015 +0200

    syncing: avoid segfault for invalid text inside items (FDO #90118)

    As reported by Canonical, syncing fails if data items contain
    text which is not correct UTF-8 in one of the fields that
    SyncEvolution logs in the command line output (like SUMMARY of
    a calendar event).

    That is because the byte string coming from the item is passed
    unchecked to the D-Bus implementation for transmission via D-Bus. But
    D-Bus strings must be correct UTF-8, so depending on the D-Bus library
    in use, one gets a segfault (GIO D-Bus, due to an unchecked NULL
    pointer access) or an "out of memory" error (libdbus, which checks for
    NULL).

    What the D-Bus bindings now do is checking the string in advance (to
    avoid error messages inside the D-Bus implementations) and then
    replacing all invalid bytes with question marks. The rest of the
    string is preserved.

    Handling this inside the D-Bus binding layer is not the "correct"
    solution (which would be to check for UTF-8 in the higher layers were
    such bad data might get into SyncEvolution), but it is the less
    intrusive and more complete one. Changing the bindings such that all
    strings must be declared explicitly as "UTF-8 string" would have been
    a way to find all places where such checks are missing, but it turned
    out to be too complex and requiring too many changes.


You are receiving this mail because: