summaryrefslogtreecommitdiff
path: root/channels/misdn/fac.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/misdn/fac.c')
-rw-r--r--channels/misdn/fac.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/misdn/fac.c b/channels/misdn/fac.c
index 994d8cf51..383a60f26 100644
--- a/channels/misdn/fac.c
+++ b/channels/misdn/fac.c
@@ -264,8 +264,8 @@ void fac_dec( unsigned char *p, Q931_info_t *qi, enum facility_type *type, unio
{
int i, fac_len=0;
unsigned char facility[256];
-
- if (! (bc->nt) )
+
+ if (!bc->nt)
{
p = NULL;
if (qi->QI_ELEMENT(facility))
@@ -274,10 +274,10 @@ void fac_dec( unsigned char *p, Q931_info_t *qi, enum facility_type *type, unio
if (!p)
return;
- fac_len = p[0];
+ fac_len = p[0] & 0xff;
+
memcpy(facility, p+1, fac_len);
-
switch(facility[0]) {
case FACILITY_CENTREX:
{