From d78463be1eb252fa160c1a6631ff7f43ce5677bb Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 1 Oct 2007 15:23:19 +0000 Subject: 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 --- pbx/dundi-parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pbx') 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) -- cgit v1.2.3