[sr-dev] git:5.4:e5de8af6: avp: check for null string
Daniel-Constantin Mierla
miconda at gmail.com
Thu Apr 15 08:38:24 CEST 2021
Module: kamailio
Branch: 5.4
Commit: e5de8af690af460f086c6191a7502c903ca55699
URL: https://github.com/kamailio/kamailio/commit/e5de8af690af460f086c6191a7502c903ca55699
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-04-15T08:35:14+02:00
avp: check for null string
(cherry picked from commit c30cd3db7587a3c875770fbc558f4a5ad38b58bd)
---
Modified: src/modules/avp/avp.c
---
Diff: https://github.com/kamailio/kamailio/commit/e5de8af690af460f086c6191a7502c903ca55699.diff
Patch: https://github.com/kamailio/kamailio/commit/e5de8af690af460f086c6191a7502c903ca55699.patch
---
diff --git a/src/modules/avp/avp.c b/src/modules/avp/avp.c
index f11d56baeb..63ce537d7a 100644
--- a/src/modules/avp/avp.c
+++ b/src/modules/avp/avp.c
@@ -1359,7 +1359,7 @@ static int attr_hdr_body2attrs(struct sip_msg* m, char* header_, char* prefix_)
}
};
}
- if (s.len && s.s[0] == header->field_delimiter) {
+ if (s.len && s.s && s.s[0] == header->field_delimiter) {
s.s++;
s.len--;
}
More information about the sr-dev
mailing list