diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-11-27 14:24:17 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-11-28 14:42:12 +0100 |
commit | 39474a3f92743b52906236e1c2b4f8406b0c7ad4 (patch) | |
tree | fcfb315e97c907edbf68471728b589d03642ac7d /src/qmicli | |
parent | 3d671dfd7f133082c8d1f126f8fc1c73edca4c13 (diff) | |
download | external_libqmi-39474a3f92743b52906236e1c2b4f8406b0c7ad4.zip external_libqmi-39474a3f92743b52906236e1c2b4f8406b0c7ad4.tar.gz external_libqmi-39474a3f92743b52906236e1c2b4f8406b0c7ad4.tar.bz2 |
qmicli,dms: error if missing fields in --dms-set-firmware-preference
Diffstat (limited to 'src/qmicli')
-rw-r--r-- | src/qmicli/qmicli-dms.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c index bc199d4..7b597e3 100644 --- a/src/qmicli/qmicli-dms.c +++ b/src/qmicli/qmicli-dms.c @@ -3029,6 +3029,11 @@ set_firmware_preference_input_create (const gchar *str, * "[(fwver),(config),(carrier)]" */ split = g_strsplit (str, ",", -1); + if (g_strv_length (split) != 3) { + g_printerr ("error: invalid format string, expected 3 elements: [(fwver),(config),(carrier)]\n"); + g_strfreev (split); + return NULL; + } /* modem unique id is the fixed wildcard string '?_?' matching any pri. * modem build id format is "(fwver)_?", matching any carrier */ |