mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 10:29:47 +00:00
trivial: Make fu_common_version_parse_from_format() NULL-safe
This commit is contained in:
parent
e17a107ce1
commit
0816151045
@ -315,6 +315,10 @@ fu_common_version_parse_from_format(const gchar *version, FwupdVersionFormat fmt
|
||||
guint64 tmp;
|
||||
guint base;
|
||||
|
||||
/* sanity check */
|
||||
if (version == NULL)
|
||||
return NULL;
|
||||
|
||||
/* already dotted decimal */
|
||||
if (g_strstr_len(version, -1, ".") != NULL)
|
||||
return g_strdup(version);
|
||||
|
Loading…
Reference in New Issue
Block a user