diff options
author | pascal <pascal@localhost> | 2012-04-08 16:03:21 +0000 |
---|---|---|
committer | pascal <pascal@localhost> | 2012-04-08 16:03:21 +0000 |
commit | 14d362a018cb0f2ee4ee55046d9918877d222548 (patch) | |
tree | 491f84730486ce78c52318aefcd8a4c9cc3c948c /epan/dissectors/packet-gtp.c | |
parent | 4616bca9e1b65b23bb8001248ff0259f444e4447 (diff) |
As suggested by Jakub, always update the digit value when the nibble is outside [0;9] range
svn path=/trunk/; revision=41984
Diffstat (limited to 'epan/dissectors/packet-gtp.c')
-rw-r--r-- | epan/dissectors/packet-gtp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index 1301ba4f8b..d019015e38 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -1903,11 +1903,11 @@ id_to_str(tvbuff_t *tvb, gint offset) if (bits4to1 <= 9) str[j++] = BCD2CHAR(bits4to1); else - j++; + str[j++] = ' '; if (bits8to5 <= 9) str[j++] = BCD2CHAR(bits8to5); else - j++; + str[j++] = ' '; } str[j] = '\0'; return str; @@ -1928,7 +1928,7 @@ msisdn_to_str(tvbuff_t *tvb, gint offset, int len) if (bits4to1 <= 9) str[j++] = BCD2CHAR(bits4to1); else - j++; + str[j++] = '?'; if (bits8to5 <= 9) str[j++] = BCD2CHAR(bits8to5); else if ((i == (MIN(len, 9) - 1)) && (bits8to5 == 0xF)) { @@ -1936,7 +1936,7 @@ msisdn_to_str(tvbuff_t *tvb, gint offset, int len) break; } else - j++; + str[j++] = '?'; } str[j] = '\0'; |