summaryrefslogtreecommitdiff
path: root/shared/nm-glib-aux/nm-shared-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/nm-glib-aux/nm-shared-utils.c')
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c
index 2a7926d75b..2b6fc1ab92 100644
--- a/shared/nm-glib-aux/nm-shared-utils.c
+++ b/shared/nm-glib-aux/nm-shared-utils.c
@@ -979,8 +979,10 @@ _nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 ma
errno = 0;
v = g_ascii_strtoll (str, (char **) &s, base);
- if (errno != 0)
+ if (errno != 0) {
+ nm_assert (NM_IN_SET (v, 0, G_MININT64, G_MAXINT64));
return fallback;
+ }
if (s[0] != '\0') {
s = nm_str_skip_leading_spaces (s);