GNOME Bugzilla – Bug 711457
gvfs-info does not escape strings properly
Last modified: 2013-11-07 14:51:23 UTC
Eg: $ gvfs-info trash:///`echo -e "\x80\x81\x82\x83\x84\x85"` display name: ?????? edit name: ?????? name: \xf0\xf1\xf2\xf3\xf4\xf5 type: regular size: 3 uri: trash:///%80%81%82%83%84%85 attributes: standard::type: 1 standard::name: \x80\x81\x82\x83\x84\x85 The "name:" row is incorrect.
Created attachment 258983 [details] [review] programs: Escape string properly Use an unsigned char to avoid implementation-defined behavior of a right shift. Shift by 4 rather than 8 to get the second half of a byte.
Review of attachment 258983 [details] [review]: It looks good.
Pushed to master as d76dce9e83ddc033b53d2603b4f4d9f73de1f112. Thanks!