Skip to content

file: Fix crash when opening properties dialog while using admin backend

Sebastian Keller requested to merge skeller/nautilus:fix-empty-gecos-crash into main

The properties dialog of a file or directory accessed using the admin backend allows changing its owner. The list of possible users for this gets populated from passwd. If one of the users in passwd has an empty GECOS field, this will cause get_real_name() to use g_strsplit() on an empty string, which means geco_parts[0] is NULL, leading to a crash when passed to g_utf8_validate().

Fix this by not doing anything when we encounter an empty GECOS field.

Closes: #3111 (closed)

Edited by Sebastian Keller

Merge request reports