about summary refs log tree commit diff
path: root/libnm-core/nm-setting-team.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-01-17 20:25:47 +0100
committerMichael Biebl <biebl@debian.org>2017-01-17 20:25:47 +0100
commitbed53db3e064450b56e23ec654f40a3bafe58815 (patch)
tree314508d6c904b1224dab2070e0cfdd5a02d7dd89 /libnm-core/nm-setting-team.c
parent7135a6e87c938139e3a5db121d62dcaa783345d1 (diff)
parent58f8be580039b0575b197b9573a1c92745d96d30 (diff)
Merge tag 'upstream/1.5.90' into experimental
Upstream version 1.5.90
Diffstat (limited to 'libnm-core/nm-setting-team.c')
-rw-r--r--libnm-core/nm-setting-team.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c
index 5bf11ed9..e83ce309 100644
--- a/libnm-core/nm-setting-team.c
+++ b/libnm-core/nm-setting-team.c
@@ -89,7 +89,17 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
 		return FALSE;
 
 	if (priv->config) {
-		if (!_nm_utils_check_valid_json (priv->config, error)) {
+		if (strlen (priv->config) > 1*1024*1024) {
+			g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY,
+			             _("team config exceeds size limit"));
+			g_prefix_error (error,
+			                "%s.%s: ",
+			                NM_SETTING_TEAM_SETTING_NAME,
+			                NM_SETTING_TEAM_CONFIG);
+			return FALSE;
+		}
+
+		if (!nm_utils_is_json_object (priv->config, error)) {
 			g_prefix_error (error,
 			                "%s.%s: ",
 			                NM_SETTING_TEAM_SETTING_NAME,