• Sergio Gelato's avatar
    glocalfileinfo: Handle arbitrary binary data in extended attribute values · 8049535f
    Sergio Gelato authored
    It's safe to assume an escaped string doesn't contain embedded null bytes,
    but raw memory buffers (as returned by getxattr()) require more care.
    
    If the length of the data to be escaped is known, use that knowledge instead
    of invoking strlen().
    
    (Turned into a git-format patch by Philip Withnall. One minor formatting
    tweak. Original patch submitted on the Debian bug tracker, bug#962912.)
    
    Fixes: #422
    8049535f
glocalfileinfo.c 78.9 KB