summaryrefslogtreecommitdiff
path: root/pbx/dundi-parser.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-10-01 15:23:19 +0000
committerRussell Bryant <russell@russellbryant.com>2007-10-01 15:23:19 +0000
commitd78463be1eb252fa160c1a6631ff7f43ce5677bb (patch)
tree5c5be0ea22d3b81ee644e5f620052a4f25f14e02 /pbx/dundi-parser.c
parent9217a05b01e31e22e57376abeb8707d9ca2d2839 (diff)
Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it. It replaces a bunch of simple calls to snprintf with ast_copy_string (closes issue #10843) Reported by: Corydon76 Patches: 2007092900_10843.diff uploaded by mvanbaak (license 7) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/dundi-parser.c')
-rw-r--r--pbx/dundi-parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 14ef9e740..675ee941a 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -229,7 +229,7 @@ static void dump_int(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned int))
snprintf(output, maxlen, "%lu", (unsigned long)ntohl(*((unsigned int *)value)));
else
- snprintf(output, maxlen, "Invalid INT");
+ ast_copy_string(output, "Invalid INT", maxlen);
}
static void dump_short(char *output, int maxlen, void *value, int len)
@@ -237,7 +237,7 @@ static void dump_short(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned short))
snprintf(output, maxlen, "%d", ntohs(*((unsigned short *)value)));
else
- snprintf(output, maxlen, "Invalid SHORT");
+ ast_copy_string(output, "Invalid SHORT", maxlen);
}
static void dump_byte(char *output, int maxlen, void *value, int len)
@@ -245,7 +245,7 @@ static void dump_byte(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned char))
snprintf(output, maxlen, "%d", *((unsigned char *)value));
else
- snprintf(output, maxlen, "Invalid BYTE");
+ ast_copy_string(output, "Invalid BYTE", maxlen);
}
static char *proto2str(int proto, char *buf, int bufsiz)