diff options
Diffstat (limited to 'channels/misdn_config.c')
-rw-r--r-- | channels/misdn_config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/misdn_config.c b/channels/misdn_config.c index 6c75b12cc..befbfb3ad 100644 --- a/channels/misdn_config.c +++ b/channels/misdn_config.c @@ -797,7 +797,9 @@ void misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char* for (; iter; iter = iter->next) { strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1); } - tempbuf[strlen(tempbuf)-2] = 0; + if (strlen(tempbuf) > 1) { + tempbuf[strlen(tempbuf)-2] = 0; + } } snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none"); break; |