Skip to content

Commit

Permalink
fix set string terminator in detect reason
Browse files Browse the repository at this point in the history
  • Loading branch information
rbucek committed Aug 18, 2015
1 parent 76256f3 commit f98e1b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sniff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2562,8 +2562,8 @@ Call *process_packet(bool is_ssl, u_int64_t packet_number,
if(exists_columns_cdr_reason) {
char *reason = gettag(data, datalen, "reason:", &l);
if(l && l < (unsigned)datalen) {
char oldEndChar = data[l];
data[l] = 0;
char oldEndChar = reason[l];
reason[l] = 0;
char *pointerToCause = strcasestr(reason, ";cause=");
if(pointerToCause && (pointerToCause - reason) < 10) {
char type[10];
Expand Down Expand Up @@ -2591,7 +2591,7 @@ Call *process_packet(bool is_ssl, u_int64_t packet_number,
call->reason_q850_text = text;
}
}
data[l] = oldEndChar;
reason[l] = oldEndChar;
}
}

Expand Down

0 comments on commit f98e1b5

Please sign in to comment.