mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
lib/util: Fix segfault when validating filename
This change fixes the segfault issue when calling ostree_repo_checkout_tree with empty GFileInfo. A simple condition check for NULL value is added at src/libotutil/ot-unix-utils.c:46. Closes: ostreedev#1864. Closes: #1868 Approved by: jlebon
This commit is contained in:
parent
e0ddaa811b
commit
6733843f87
@ -43,6 +43,8 @@ gboolean
|
||||
ot_util_filename_validate (const char *name,
|
||||
GError **error)
|
||||
{
|
||||
if (name == NULL)
|
||||
return glnx_throw (error, "Invalid NULL filename");
|
||||
if (strcmp (name, ".") == 0)
|
||||
return glnx_throw (error, "Invalid self-referential filename '.'");
|
||||
if (strcmp (name, "..") == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user