diff libfdcore/p_ce.c @ 1562:6219359a36a9 default tip

Merge latest changes from proposed branch
author Sebastien Decugis <sdecugis@freediameter.net>
date Mon, 21 Jun 2021 19:08:18 +0800
parents 2dbc816d48f4
children
line wrap: on
line diff
--- a/libfdcore/p_ce.c	Sat Oct 10 12:58:37 2020 +0800
+++ b/libfdcore/p_ce.c	Mon Jun 21 19:08:18 2021 +0800
@@ -336,6 +336,14 @@
 					return EINVAL;
 				}
 				
+				/* Origin-Realm is empty */
+				if (hdr->avp_value->os.len == 0) {
+					error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";
+					error->pei_message = "Your Origin-Realm is empty.";
+					error->pei_avp = avp;
+					return EINVAL;
+				}
+
 				/* Save the value */
 				CHECK_MALLOC(  peer->p_hdr.info.runtime.pir_realm = os0dup( hdr->avp_value->os.data, hdr->avp_value->os.len )  );
 				peer->p_hdr.info.runtime.pir_realmlen = hdr->avp_value->os.len;
"Welcome to our mercurial repository"