get_avp_val() caused crash with int AVP name and string type
authorMiklos Tirpak <miklos@iptel.org>
Thu, 31 Aug 2006 13:18:34 +0000 (13:18 +0000)
committerMiklos Tirpak <miklos@iptel.org>
Thu, 31 Aug 2006 13:18:34 +0000 (13:18 +0000)
usr_avp.c

index 2f32d21..e6d7c83 100644 (file)
--- a/usr_avp.c
+++ b/usr_avp.c
@@ -330,7 +330,7 @@ inline void get_avp_val(avp_t *avp, avp_value_t *val)
                        break;
                case AVP_VAL_STR:
                        /* avp type ID, str value */
-                       val->s = *(str*)(avp->data);
+                       val->s = *(str*)(&avp->data);
                        break;
                case AVP_NAME_STR|AVP_VAL_STR:
                        /* avp type str, str value */