From dac373f5395aca9a9f3f75b089e415ec6f0a51f4 Mon Sep 17 00:00:00 2001 From: russell 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: http://svn.digium.com/svn/asterisk/trunk@84173 f38db490-d61c-443f-a65b-d21fe96a405b --- 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