Index: pbx/dundi-parser.c
===================================================================
--- pbx/dundi-parser.c	(revision 84122)
+++ pbx/dundi-parser.c	(working copy)
@@ -229,7 +229,7 @@
 	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 @@
 	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 @@
 	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)
Index: channels/chan_sip.c
===================================================================
--- channels/chan_sip.c	(revision 84122)
+++ channels/chan_sip.c	(working copy)
@@ -2586,7 +2586,7 @@
 {
 	if (!req->lines) {
 		/* Add extra empty return. add_header() reserves 4 bytes so cannot be truncated */
-		snprintf(req->data + req->len, sizeof(req->data) - req->len, "\r\n");
+		ast_copy_string(req->data + req->len, "\r\n", sizeof(req->data) - req->len);
 		req->len += strlen(req->data + req->len);
 	}
 }
@@ -6175,7 +6175,7 @@
 	}
 	if (!req->lines) {
 		/* Add extra empty return */
-		snprintf(req->data + req->len, sizeof(req->data) - req->len, "\r\n");
+		ast_copy_string(req->data + req->len, "\r\n", sizeof(req->data) - req->len);
 		req->len += strlen(req->data + req->len);
 	}
 	if (req->len >= sizeof(req->data) - 4) {
Index: channels/chan_iax2.c
===================================================================
--- channels/chan_iax2.c	(revision 84122)
+++ channels/chan_iax2.c	(working copy)
@@ -5969,9 +5969,9 @@
 			else if (reg->messages > 1)
 				snprintf(msgstatus, sizeof(msgstatus), " with %d new messages waiting\n", reg->messages);
 			else if (reg->messages > 0)
-				snprintf(msgstatus, sizeof(msgstatus), " with 1 new message waiting\n");
+				ast_copy_string(msgstatus, " with 1 new message waiting\n", sizeof(msgstatus));
 			else
-				snprintf(msgstatus, sizeof(msgstatus), " with no messages waiting\n");
+				ast_copy_string(msgstatus, " with no messages waiting\n", sizeof(msgstatus));
 			snprintf(ourip, sizeof(ourip), "%s:%d", ast_inet_ntoa(reg->us.sin_addr), ntohs(reg->us.sin_port));
 		ast_verb(3, "Registered IAX2 to '%s', who sees us as %s%s\n", ast_inet_ntoa(sin->sin_addr), ourip, msgstatus);
 		manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: IAX2\r\nDomain: %s\r\nStatus: Registered\r\n", ast_inet_ntoa(sin->sin_addr));
Index: channels/chan_misdn.c
===================================================================
--- channels/chan_misdn.c	(revision 84122)
+++ channels/chan_misdn.c	(working copy)
@@ -1701,7 +1701,7 @@
 
 	misdn_cfg_get(bc->port, MISDN_CFG_ECHOCANCEL, &ec, sizeof(ec));
 	if (ec == 1)
-		snprintf(bc->pipeline, sizeof(bc->pipeline), "mg2ec");
+		ast_copy_string(bc->pipeline, "mg2ec", sizeof(bc->pipeline));
 	else if (ec > 1)
 		snprintf(bc->pipeline, sizeof(bc->pipeline), "mg2ec(deftaps=%d)", ec);
 
Index: channels/chan_skinny.c
===================================================================
--- channels/chan_skinny.c	(revision 84122)
+++ channels/chan_skinny.c	(working copy)
@@ -4221,8 +4221,8 @@
 		return -1;
 
 	req->data.speeddialreq.speedDialNumber = htolel(instance);
-	snprintf(req->data.speeddial.speedDialDirNumber, sizeof(req->data.speeddial.speedDialDirNumber), sd->exten);
-	snprintf(req->data.speeddial.speedDialDisplayName, sizeof(req->data.speeddial.speedDialDisplayName), sd->label);
+	ast_copy_string(req->data.speeddial.speedDialDirNumber, sd->exten, sizeof(req->data.speeddial.speedDialDirNumber));
+	ast_copy_string(req->data.speeddial.speedDialDisplayName, sd->label, sizeof(req->data.speeddial.speedDialDisplayName));
 
 	transmit_response(s, req);
 	return 1;
@@ -4442,7 +4442,7 @@
 	if (!(req = req_alloc(sizeof(struct version_res_message), VERSION_RES_MESSAGE)))
 		return -1;
 
-	snprintf(req->data.version.version, sizeof(req->data.version.version), d->version_id);
+	ast_copy_string(req->data.version.version, d->version_id, sizeof(req->data.version.version));
 	transmit_response(s, req);
 	return 1;
 }
Index: channels/chan_mgcp.c
===================================================================
--- channels/chan_mgcp.c	(revision 84122)
+++ channels/chan_mgcp.c	(working copy)
@@ -882,7 +882,7 @@
 				ast_verb(3, "MGCP distinctive callwait %s\n", tone);
 			}
 		} else {
-			snprintf(tone, sizeof(tone), "L/wt");
+			ast_copy_string(tone, "L/wt", sizeof(tone));
 			if (mgcpdebug) {
 				ast_verb(3, "MGCP normal callwait %s\n", tone);
 			}
@@ -896,7 +896,7 @@
 				ast_verb(3, "MGCP distinctive ring %s\n", tone);
 			}
 		} else {
-			snprintf(tone, sizeof(tone), "L/rg");
+			ast_copy_string(tone, "L/rg", sizeof(tone));
 			if (mgcpdebug) {
 				ast_verb(3, "MGCP default ring\n");
 			}
@@ -1932,7 +1932,7 @@
 	}
 	if (!req->lines) {
 		/* Add extra empty return */
-		snprintf(req->data + req->len, sizeof(req->data) - req->len, "\r\n");
+		ast_copy_string(req->data + req->len, "\r\n", sizeof(req->data) - req->len);
 		req->len += strlen(req->data + req->len);
 	}
 	req->line[req->lines] = req->data + req->len;
@@ -2065,11 +2065,11 @@
 	if (mgcpdebug) {
 		ast_verbose("We're at %s port %d\n", ast_inet_ntoa(p->parent->ourip), ntohs(sin.sin_port));
 	}
-	snprintf(v, sizeof(v), "v=0\r\n");
+	ast_copy_string(v, "v=0\r\n", sizeof(v));
 	snprintf(o, sizeof(o), "o=root %d %d IN IP4 %s\r\n", (int)getpid(), (int)getpid(), ast_inet_ntoa(dest.sin_addr));
-	snprintf(s, sizeof(s), "s=session\r\n");
+	ast_copy_string(s, "s=session\r\n", sizeof(s));
 	snprintf(c, sizeof(c), "c=IN IP4 %s\r\n", ast_inet_ntoa(dest.sin_addr));
-	snprintf(t, sizeof(t), "t=0 0\r\n");
+	ast_copy_string(t, "t=0 0\r\n", sizeof(t));
 	snprintf(m, sizeof(m), "m=audio %d RTP/AVP", ntohs(dest.sin_port));
 	for (x = 1; x <= AST_FORMAT_MAX_AUDIO; x <<= 1) {
 		if (p->capability & x) {
@@ -2136,7 +2136,7 @@
 		ast_rtp_get_peer(rtp, &sub->tmpdest);
 		return 0;
 	}
-	snprintf(local, sizeof(local), "p:20");
+	ast_copy_string(local, "p:20", sizeof(local));
 	for (x=1;x<= AST_FORMAT_MAX_AUDIO; x <<= 1) {
 		if (p->capability & x) {
 			snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x, 0));
@@ -2166,7 +2166,7 @@
 	int x;
 	struct mgcp_endpoint *p = sub->parent;
 
-	snprintf(local, sizeof(local), "p:20");
+	ast_copy_string(local, "p:20", sizeof(local));
 	for (x=1;x<= AST_FORMAT_MAX_AUDIO; x <<= 1) {
 		if (p->capability & x) {
 			snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x, 0));
Index: channels/iax2-parser.c
===================================================================
--- channels/iax2-parser.c	(revision 84122)
+++ channels/iax2-parser.c	(working copy)
@@ -82,7 +82,7 @@
 		memcpy(&sin, value, len);
 		snprintf(output, maxlen, "IPV4 %s:%d", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
 	} else {
-		snprintf(output, maxlen, "Invalid Address");
+		ast_copy_string(output, "Invalid Address", maxlen);
 	}
 }
 
Index: apps/app_meetme.c
===================================================================
--- apps/app_meetme.c	(revision 84122)
+++ apps/app_meetme.c	(working copy)
@@ -1477,7 +1477,7 @@
 			}
 			conf->recordingformat = pbx_builtin_getvar_helper(chan, "MEETME_RECORDINGFORMAT");
 			if (!conf->recordingformat) {
-				snprintf(recordingtmp, sizeof(recordingtmp), "wav");
+				ast_copy_string(recordingtmp, "wav", sizeof(recordingtmp));
 				conf->recordingformat = ast_strdupa(recordingtmp);
 			}
 			ast_verb(4, "Starting recording of MeetMe Conference %s into file %s.%s.\n",
Index: apps/app_minivm.c
===================================================================
--- apps/app_minivm.c	(revision 84122)
+++ apps/app_minivm.c	(working copy)
@@ -934,7 +934,7 @@
 		char tmpcmd[PATH_MAX];
 		int tmpfd;
 
-		snprintf(newtmp, sizeof(newtmp), "/tmp/XXXXXX");
+		ast_copy_string(newtmp, "/tmp/XXXXXX", sizeof(newtmp));
 		ast_debug(3, "newtmp: %s\n", newtmp);
 		tmpfd = mkstemp(newtmp);
 		snprintf(tmpcmd, sizeof(tmpcmd), "sox -v %.4f %s.%s %s.%s", vmu->volgain, filename, format, newtmp, format);
Index: main/rtp.c
===================================================================
--- main/rtp.c	(revision 84122)
+++ main/rtp.c	(working copy)
@@ -2113,7 +2113,7 @@
 	}
 
 	if (start == end)
-		snprintf(start, size, "nothing)"); 
+		ast_copy_string(start, "nothing)", size); 
 	else if (size > 1)
 		*(end -1) = ')';
 	
Index: main/asterisk.c
===================================================================
--- main/asterisk.c	(revision 84122)
+++ main/asterisk.c	(working copy)
@@ -1880,7 +1880,7 @@
 	} else if (remotehostname)
 		snprintf(prompt, sizeof(prompt), ASTERISK_PROMPT2, remotehostname);
 	else
-		snprintf(prompt, sizeof(prompt), ASTERISK_PROMPT);
+		ast_copy_string(prompt, ASTERISK_PROMPT, sizeof(prompt));
 
 	return(prompt);	
 }
@@ -2206,7 +2206,7 @@
 	snprintf(tmp, sizeof(tmp), "core set debug atleast %d", option_debug);
 	fdprint(ast_consock, tmp);
 	if (ast_opt_mute) {
-		snprintf(tmp, sizeof(tmp), "log and verbose output currently muted ('logger unmute' to unmute)");
+		ast_copy_string(tmp, "log and verbose output currently muted ('logger unmute' to unmute)", sizeof(tmp));
 		fdprint(ast_consock, tmp);
 	}
 	ast_verbose("Connected to Asterisk %s currently running on %s (pid = %d)\n", version, hostname, pid);
Index: main/frame.c
===================================================================
--- main/frame.c	(revision 84122)
+++ main/frame.c	(working copy)
@@ -555,7 +555,7 @@
 		}
 	}
 	if (start == end)
-		snprintf(start, size, "nothing)");
+		ast_copy_string(start, "nothing)", size);
 	else if (size > 1)
 		*(end -1) = ')';
 	return buf;
Index: main/say.c
===================================================================
--- main/say.c	(revision 84122)
+++ main/say.c	(working copy)
@@ -486,14 +486,14 @@
 
 	while (!res && (num || playh)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else	if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -512,14 +512,14 @@
 					if (res)
 						return res;
 					num = num % 1000;
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					if (num < 1000000000) {	/* 1,000,000,000 */
 						res = ast_say_number_full_en(chan, num / 1000000, ints, language, audiofd, ctrlfd);
 						if (res)
 							return res;
 						num = num % 1000000;
-						snprintf(fn, sizeof(fn), "digits/million");
+						ast_copy_string(fn, "digits/million", sizeof(fn));
 					} else {
 						ast_debug(1, "Number '%d' is too big for me\n", num);
 						res = -1;
@@ -588,7 +588,7 @@
 	
 	while (!res && (num || playh)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
@@ -608,17 +608,17 @@
 		} else if (num < 1000) {
 			hundered = num / 100;
 			if ( hundered == 1 ) {
-				snprintf(fn, sizeof(fn), "digits/1sto");
+				ast_copy_string(fn, "digits/1sto", sizeof(fn));
 			} else if ( hundered == 2 ) {
-				snprintf(fn, sizeof(fn), "digits/2ste");
+				ast_copy_string(fn, "digits/2ste", sizeof(fn));
 			} else {
 					res = ast_say_number_full_cz(chan,hundered,ints,language,options,audiofd,ctrlfd);
 				if (res)
 					return res;
 				if (hundered == 3 || hundered == 4) {	
-					snprintf(fn, sizeof(fn), "digits/sta");
+					ast_copy_string(fn, "digits/sta", sizeof(fn));
 				} else if ( hundered > 4 ) {
-					snprintf(fn, sizeof(fn), "digits/set");
+					ast_copy_string(fn, "digits/set", sizeof(fn));
 				}
 			}
 			num -= (hundered * 100);
@@ -691,20 +691,20 @@
 		*   four-and thirty" and 1000012 is "one million and twelve".
 		*/
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (playa) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			playa = 0;
 		} else if (num == 1 && cn == -1) {
-			snprintf(fn, sizeof(fn), "digits/1N");
+			ast_copy_string(fn, "digits/1N", sizeof(fn));
 			num = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -722,7 +722,7 @@
 			if (num < 1000) {
 				int hundreds = num / 100;
 				if (hundreds == 1)
-					snprintf(fn, sizeof(fn), "digits/1N");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
 				else
 					snprintf(fn, sizeof(fn), "digits/%d", (num / 100));
 
@@ -737,7 +737,7 @@
 					if (res)
 						return res;
 					num = num % 1000;
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					if (num < 1000000000) {
 						int millions = num / 1000000;
@@ -745,9 +745,9 @@
 						if (res)
 							return res;
 						if (millions == 1)
-							snprintf(fn, sizeof(fn), "digits/million");
+							ast_copy_string(fn, "digits/million", sizeof(fn));
 						else
-							snprintf(fn, sizeof(fn), "digits/millions");
+							ast_copy_string(fn, "digits/millions", sizeof(fn));
 						num = num % 1000000;
 					} else {
 						ast_debug(1, "Number '%d' is too big for me\n", num);
@@ -804,14 +804,14 @@
 		* - "million" is different in singular and plural form
 		*/
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (num < 100 && t) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			t = 0;
 		} else if (num == 1 && mf == -1) {
 			snprintf(fn, sizeof(fn), "digits/%dF", num);
@@ -829,60 +829,60 @@
 				num = 0;
 			}
 		} else if (num == 100 && t == 0) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			num = 0;
 		} else if (num < 1000) {
 			int hundreds = num / 100;
 			num = num % 100;
 			if (hundreds == 1) {
-				snprintf(fn, sizeof(fn), "digits/1N");
+				ast_copy_string(fn, "digits/1N", sizeof(fn));
 			} else {
 				snprintf(fn, sizeof(fn), "digits/%d", hundreds);
 			}
-			snprintf(fna, sizeof(fna), "digits/hundred");
+			ast_copy_string(fna, "digits/hundred", sizeof(fna));
 			t = 1;
 		} else if (num == 1000 && t == 0) {
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = 0;
 		} else 	if (num < 1000000) {
 			int thousands = num / 1000;
 			num = num % 1000;
 			t = 1;
 			if (thousands == 1) {
-				snprintf(fn, sizeof(fn), "digits/1N");
-				snprintf(fna, sizeof(fna), "digits/thousand");
+				ast_copy_string(fn, "digits/1N", sizeof(fn));
+				ast_copy_string(fna, "digits/thousand", sizeof(fna));
 			} else {
 				res = ast_say_number_full_de(chan, thousands, ints, language, options, audiofd, ctrlfd);
 				if (res)
 					return res;
-				snprintf(fn, sizeof(fn), "digits/thousand");
+				ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			}
 		} else if (num < 1000000000) {
 			int millions = num / 1000000;
 			num = num % 1000000;
 			t = 1;
 			if (millions == 1) {
-				snprintf(fn, sizeof(fn), "digits/1F");
-				snprintf(fna, sizeof(fna), "digits/million");
+				ast_copy_string(fn, "digits/1F", sizeof(fn));
+				ast_copy_string(fna, "digits/million", sizeof(fna));
 			} else {
 				res = ast_say_number_full_de(chan, millions, ints, language, options, audiofd, ctrlfd);
 				if (res)
 					return res;
-				snprintf(fn, sizeof(fn), "digits/millions");
+				ast_copy_string(fn, "digits/millions", sizeof(fn));
 			}
 		} else if (num <= INT_MAX) {
 			int billions = num / 1000000000;
 			num = num % 1000000000;
 			t = 1;
 			if (billions == 1) {
-				snprintf(fn, sizeof(fn), "digits/1F");
-				snprintf(fna, sizeof(fna), "digits/milliard");
+				ast_copy_string(fn, "digits/1F", sizeof(fn));
+				ast_copy_string(fna, "digits/milliard", sizeof(fna));
 			} else {
 				res = ast_say_number_full_de(chan, billions, ints, language, options, audiofd, ctrlfd);
 				if (res) {
 					return res;
 				}
-				snprintf(fn, sizeof(fn), "digits/milliards");
+				ast_copy_string(fn, "digits/milliards", sizeof(fn));
 			}
 		} else {
 			ast_debug(1, "Number '%d' is too big for me\n", num);
@@ -926,17 +926,17 @@
 
 	while (!res && (num || playh || playa )) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (playa) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			playa = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -956,7 +956,7 @@
 			res = ast_say_number_full_en_GB(chan, num / 1000, ints, language, audiofd, ctrlfd);
 			if (res)
 				return res;
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = num % 1000;
 			if (num && num < 100)
 				playa++;
@@ -965,7 +965,7 @@
 				res = ast_say_number_full_en_GB(chan, millions, ints, language, audiofd, ctrlfd);
 				if (res)
 					return res;
-				snprintf(fn, sizeof(fn), "digits/million");
+				ast_copy_string(fn, "digits/million", sizeof(fn));
 				num = num % 1000000;
 				if (num && num < 100)
 					playa++;
@@ -1011,14 +1011,14 @@
 
 	while (!res && num) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playa) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			playa = 0;
 		} else if (num == 1) {
 			if (mf < 0)
@@ -1037,10 +1037,10 @@
 			if (num)
 				playa++;
 		} else if (num == 100) {
-			snprintf(fn, sizeof(fn), "digits/100");
+			ast_copy_string(fn, "digits/100", sizeof(fn));
 			num = 0;
 		} else if (num < 200) {
-			snprintf(fn, sizeof(fn), "digits/100-and");
+			ast_copy_string(fn, "digits/100-and", sizeof(fn));
 			num -= 100;
 		} else {
 			if (num < 1000) {
@@ -1048,26 +1048,26 @@
 				num -= ((num/100)*100);
 			} else if (num < 2000) {
 				num = num % 1000;
-				snprintf(fn, sizeof(fn), "digits/thousand");
+				ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			} else {
 				if (num < 1000000) {
 					res = ast_say_number_full_es(chan, num / 1000, ints, language, options, audiofd, ctrlfd);
 					if (res)
 						return res;
 					num = num % 1000;
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					if (num < 2147483640) {
 						if ((num/1000000) == 1) {
 							res = ast_say_number_full_es(chan, num / 1000000, ints, language, "M", audiofd, ctrlfd);
 							if (res)
 								return res;
-							snprintf(fn, sizeof(fn), "digits/million");
+							ast_copy_string(fn, "digits/million", sizeof(fn));
 						} else {
 							res = ast_say_number_full_es(chan, num / 1000000, ints, language, options, audiofd, ctrlfd);
 							if (res)
 								return res;
-							snprintf(fn, sizeof(fn), "digits/millions");
+							ast_copy_string(fn, "digits/millions", sizeof(fn));
 						}
 						num = num % 1000000;
 					} else {
@@ -1112,17 +1112,17 @@
 
 	while (!res && (num || playh || playa)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (playa) {
-			snprintf(fn, sizeof(fn), "digits/et");
+			ast_copy_string(fn, "digits/et", sizeof(fn));
 			playa = 0;
 		} else if (num == 1) {
 			if (mf < 0)
@@ -1138,33 +1138,33 @@
 			if ((num % 10) == 1) playa++;
 			num = num % 10;
 		} else if (num < 80) {
-			snprintf(fn, sizeof(fn), "digits/60");
+			ast_copy_string(fn, "digits/60", sizeof(fn));
 			if ((num % 10) == 1) playa++;
 			num -= 60;
 		} else if (num < 100) {
-			snprintf(fn, sizeof(fn), "digits/80");
+			ast_copy_string(fn, "digits/80", sizeof(fn));
 			num = num - 80;
 		} else if (num < 200) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			num = num - 100;
 		} else if (num < 1000) {
 			snprintf(fn, sizeof(fn), "digits/%d", (num/100));
 			playh++;
 			num = num % 100;
 		} else if (num < 2000) {
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = num - 1000;
 		} else if (num < 1000000) {
 			res = ast_say_number_full_fr(chan, num / 1000, ints, language, options, audiofd, ctrlfd);
 			if (res)
 				return res;
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = num % 1000;
 		} else	if (num < 1000000000) {
 			res = ast_say_number_full_fr(chan, num / 1000000, ints, language, options, audiofd, ctrlfd);
 			if (res)
 				return res;
-			snprintf(fn, sizeof(fn), "digits/million");
+			ast_copy_string(fn, "digits/million", sizeof(fn));
 			num = num % 1000000;
 		} else {
 			ast_debug(1, "Number '%d' is too big for me\n", num);
@@ -1262,13 +1262,13 @@
 			num, state, options, mf
 		);
 		if (state==1) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			state = 0;
 		} else if (state==2) {
-			snprintf(fn, sizeof(fn), "digits/ve");
+			ast_copy_string(fn, "digits/ve", sizeof(fn));
 			state = 0;
 		} else if (state==3) {
-			snprintf(fn, sizeof(fn), "digits/thousands");
+			ast_copy_string(fn, "digits/thousands", sizeof(fn));
 			state=0;
 		} else if (num <21) {
 			if (mf < 0)
@@ -1281,11 +1281,11 @@
 			num = num % 10;
 			if (num>0) state=2;
 		} else if (num < 200) {
-			snprintf(fn, sizeof(fn), "digits/1hundred");
+			ast_copy_string(fn, "digits/1hundred", sizeof(fn));
 			num = num - 100;
 			state=2;
 		} else if (num < 300) {
-			snprintf(fn, sizeof(fn), "digits/2hundred");
+			ast_copy_string(fn, "digits/2hundred", sizeof(fn));
 			num = num - 200;
 			state=2;
 		} else if (num < 1000) {
@@ -1293,10 +1293,10 @@
 			state=1;
 			num = num % 100;
 		} else if (num < 2000) {
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = num - 1000;
 		} else if (num < 3000) {
-			snprintf(fn, sizeof(fn), "digits/2thousand");
+			ast_copy_string(fn, "digits/2thousand", sizeof(fn));
 			num = num - 2000;
                         if (num>0) state=2;
 		} else if (num < 20000) {
@@ -1307,13 +1307,13 @@
 			res = ast_say_number_full_he(chan, num / 1000, ints, language, options, audiofd, ctrlfd);
 			if (res)
 				return res;
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = num % 1000;
 		} else	if (num < 1000000000) {
 			res = ast_say_number_full_he(chan, num / 1000000, ints, language, options, audiofd, ctrlfd);
 			if (res)
 				return res;
-			snprintf(fn, sizeof(fn), "digits/million");
+			ast_copy_string(fn, "digits/million", sizeof(fn));
 			num = num % 1000000;
 		} else {
 			ast_debug(1, "Number '%d' is too big for me\n", num);
@@ -1353,23 +1353,23 @@
 
 	while(!res && (num || playh)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (num < 11 || num == 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
 			num = 0;
 		} else if (num < 20) {
-			snprintf(fn, sizeof(fn), "digits/10en");
+			ast_copy_string(fn, "digits/10en", sizeof(fn));
 			num = (num - 10);
 		} else if (num < 30) {
-			snprintf(fn, sizeof(fn), "digits/20on");
+			ast_copy_string(fn, "digits/20on", sizeof(fn));
 			num = (num - 20);
 		} else	if (num < 100) {
 			snprintf(fn, sizeof(fn), "digits/%d", (num /10) * 10);
@@ -1385,14 +1385,14 @@
 					if (res)
 						return res;
 					num = num % 1000;
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					if (num < 1000000000) {	/* 1,000,000,000 */
 						res = ast_say_number_full_hu(chan, num / 1000000, ints, language, audiofd, ctrlfd);
 						if (res)
 							return res;
 						num = num % 1000000;
-						snprintf(fn, sizeof(fn), "digits/million");
+						ast_copy_string(fn, "digits/million", sizeof(fn));
 					} else {
 						ast_debug(1, "Number '%d' is too big for me\n", num);
 						res = -1;
@@ -1450,14 +1450,14 @@
 
 	while (!res && (num || playh)) {
 			if (num < 0) {
-				snprintf(fn, sizeof(fn), "digits/minus");
+				ast_copy_string(fn, "digits/minus", sizeof(fn));
 				if ( num > INT_MIN ) {
 					num = -num;
 				} else {
 					num = 0;
 				}	
 			} else if (playh) {
-				snprintf(fn, sizeof(fn), "digits/hundred");
+				ast_copy_string(fn, "digits/hundred", sizeof(fn));
 				playh = 0;
 			} else if (num < 20) {
 				snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -1519,7 +1519,7 @@
 						snprintf(fn, sizeof(fn), "digits/%d", (num/100));
 						playh++;
 					} else {
-						snprintf(fn, sizeof(fn), "digits/hundred");
+						ast_copy_string(fn, "digits/hundred", sizeof(fn));
 					}
 					num -= ((num / 100) * 100);
 				} else {
@@ -1531,9 +1531,9 @@
 						tempnum = num;
 						num = num % 1000;
 						if ((tempnum / 1000) < 2)
-							snprintf(fn, sizeof(fn), "digits/thousand");
+							ast_copy_string(fn, "digits/thousand", sizeof(fn));
 						else /* for 1000 it says mille, for >1000 (eg 2000) says mila */
-							snprintf(fn, sizeof(fn), "digits/thousands");
+							ast_copy_string(fn, "digits/thousands", sizeof(fn));
 					} else {
 						if (num < 1000000000) { /* 1,000,000,000 */
 							if ((num / 1000000) > 1)
@@ -1543,9 +1543,9 @@
 							tempnum = num;
 							num = num % 1000000;
 							if ((tempnum / 1000000) < 2)
-								snprintf(fn, sizeof(fn), "digits/million");
+								ast_copy_string(fn, "digits/million", sizeof(fn));
 							else
-								snprintf(fn, sizeof(fn), "digits/millions");
+								ast_copy_string(fn, "digits/millions", sizeof(fn));
 						} else {
 							ast_debug(1, "Number '%d' is too big for me\n", num);
 							res = -1;
@@ -1579,14 +1579,14 @@
 		return ast_say_digits_full(chan, 0,ints, language, audiofd, ctrlfd);
 	while (!res && (num || playh )) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -1598,7 +1598,7 @@
 				if (res)
 					return res;
 				num = num - units;
-				snprintf(fn, sizeof(fn), "digits/nl-en");
+				ast_copy_string(fn, "digits/nl-en", sizeof(fn));
 			} else {
 				snprintf(fn, sizeof(fn), "digits/%d", num - units);
 				num = 0;
@@ -1628,14 +1628,14 @@
 					if (res)
 						return res;
 					num = num % 1000;
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					if (num < 1000000000) { /* 1,000,000,000 */
 						res = ast_say_number_full_nl(chan, num / 1000000, ints, language, audiofd, ctrlfd);
 						if (res)
 							return res;
 						num = num % 1000000;
-						snprintf(fn, sizeof(fn), "digits/million");
+						ast_copy_string(fn, "digits/million", sizeof(fn));
 					} else {
 						ast_debug(1, "Number '%d' is too big for me\n", num);
 						res = -1;
@@ -1682,20 +1682,20 @@
 		*   thirty-four" and 1000012 is "one million and twelve".
 		*/
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (playa) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			playa = 0;
 		} else if (num == 1 && cn == -1) {
-			snprintf(fn, sizeof(fn), "digits/1N");
+			ast_copy_string(fn, "digits/1N", sizeof(fn));
 			num = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -1706,7 +1706,7 @@
 		} else if (num < 1000) {
 			int hundreds = num / 100;
 			if (hundreds == 1)
-				snprintf(fn, sizeof(fn), "digits/1N");
+				ast_copy_string(fn, "digits/1N", sizeof(fn));
 			else
 				snprintf(fn, sizeof(fn), "digits/%d", (num / 100));
 
@@ -1718,7 +1718,7 @@
 			res = ast_say_number_full_no(chan, num / 1000, ints, language, "n", audiofd, ctrlfd);
 			if (res)
 				return res;
-			snprintf(fn, sizeof(fn), "digits/thousand");
+			ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			num = num % 1000;
 			if (num && num < 100)
 				playa++;
@@ -1727,7 +1727,7 @@
 				res = ast_say_number_full_no(chan, millions, ints, language, "c", audiofd, ctrlfd);
 				if (res)
 					return res;
-				snprintf(fn, sizeof(fn), "digits/million");
+				ast_copy_string(fn, "digits/million", sizeof(fn));
 				num = num % 1000000;
 				if (num && num < 100)
 					playa++;
@@ -2063,7 +2063,7 @@
 
 	while (!res && num ) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
@@ -2082,9 +2082,9 @@
 			num = num % 10;
 		} else if (num < 1000) {
 			if (num == 100)
-				snprintf(fn, sizeof(fn), "digits/100");
+				ast_copy_string(fn, "digits/100", sizeof(fn));
 			else if (num < 200)
-				snprintf(fn, sizeof(fn), "digits/100E");
+				ast_copy_string(fn, "digits/100E", sizeof(fn));
 			else {
 				if (mf < 0 && num > 199)
 					snprintf(fn, sizeof(fn), "digits/%dF", (num / 100) * 100);
@@ -2100,7 +2100,7 @@
 				if (res)
 					return res;
 			}
-			snprintf(fn, sizeof(fn), "digits/1000");
+			ast_copy_string(fn, "digits/1000", sizeof(fn));
 			if ((num % 1000) && ((num % 1000) < 100  || !(num % 100)))
 				playh = 1;
 			num = num % 1000;
@@ -2109,9 +2109,9 @@
 			if (res)
 				return res;
 			if (num < 2000000)
-				snprintf(fn, sizeof(fn), "digits/1000000");
+				ast_copy_string(fn, "digits/1000000", sizeof(fn));
 			else
-				snprintf(fn, sizeof(fn), "digits/1000000S");
+				ast_copy_string(fn, "digits/1000000S", sizeof(fn));
  
 			if ((num % 1000000) &&
 				/* no thousands */
@@ -2156,14 +2156,14 @@
 
 	while (!res && (num || playh)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/hundred");
+			ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			playh = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -2172,7 +2172,7 @@
 			snprintf(fn, sizeof(fn), "digits/%d", (num /10) * 10);
 			num -= ((num / 10) * 10);
 		} else if (num == 1 && cn == -1) {	/* En eller ett? */
-		 	snprintf(fn, sizeof(fn), "digits/1N");
+		 	ast_copy_string(fn, "digits/1N", sizeof(fn));
 			num = 0;
 		} else {
 			if (num < 1000){
@@ -2186,7 +2186,7 @@
 						return res;
 					}
 					num = num % 1000;
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					if (num < 1000000000) {	/* 1,000,000,000 */
 						res = ast_say_number_full_se(chan, num / 1000000, ints, language, options, audiofd, ctrlfd);
@@ -2194,7 +2194,7 @@
 							return res;
 						}
 						num = num % 1000000;
-						snprintf(fn, sizeof(fn), "digits/million");
+						ast_copy_string(fn, "digits/million", sizeof(fn));
 					} else {
 						ast_debug(1, "Number '%d' is too big for me\n", num);
 						res = -1;
@@ -2226,14 +2226,14 @@
 
 	while (!res && (num || playh)) {
 			if (num < 0) {
-				snprintf(fn, sizeof(fn), "digits/minus");
+				ast_copy_string(fn, "digits/minus", sizeof(fn));
 				if ( num > INT_MIN ) {
 					num = -num;
 				} else {
 					num = 0;
 				}	
 			} else if (playh) {
-				snprintf(fn, sizeof(fn), "digits/hundred");
+				ast_copy_string(fn, "digits/hundred", sizeof(fn));
 				playh = 0;
 			} else	if (num < 10) {
 				snprintf(fn, sizeof(fn), "digits/%d", num);
@@ -2252,14 +2252,14 @@
 						if (res)
 							return res;
 						num = num % 1000;
-						snprintf(fn, sizeof(fn), "digits/thousand");
+						ast_copy_string(fn, "digits/thousand", sizeof(fn));
 					} else {
 						if (num < 1000000000) {	/* 1,000,000,000 */
 							res = ast_say_number_full_tw(chan, num / 1000000, ints, language, audiofd, ctrlfd);
 							if (res)
 								return res;
 							num = num % 1000000;
-							snprintf(fn, sizeof(fn), "digits/million");
+							ast_copy_string(fn, "digits/million", sizeof(fn));
 						} else {
 							ast_debug(1, "Number '%d' is too big for me\n", num);
 							res = -1;
@@ -2318,7 +2318,7 @@
 
 	while (!res && (num)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus");
+			ast_copy_string(fn, "digits/minus", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
@@ -2348,11 +2348,11 @@
 			if (res)
 				return res;
 			if (lastdigits == 1) {
-				snprintf(fn, sizeof(fn), "digits/thousand");
+				ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			} else if (lastdigits > 1 && lastdigits < 5) {
-				snprintf(fn, sizeof(fn), "digits/thousands-i");
+				ast_copy_string(fn, "digits/thousands-i", sizeof(fn));
 			} else {
-				snprintf(fn, sizeof(fn), "digits/thousands");
+				ast_copy_string(fn, "digits/thousands", sizeof(fn));
 			}
 			num %= 1000;
 		} else 	if (num < 1000000000) {	/* 1,000,000,000 */
@@ -2362,11 +2362,11 @@
 			if (res)
 				return res;
 			if (lastdigits == 1) {
-				snprintf(fn, sizeof(fn), "digits/million");
+				ast_copy_string(fn, "digits/million", sizeof(fn));
 			} else if (lastdigits > 1 && lastdigits < 5) {
-				snprintf(fn, sizeof(fn), "digits/million-a");
+				ast_copy_string(fn, "digits/million-a", sizeof(fn));
 			} else {
-				snprintf(fn, sizeof(fn), "digits/millions");
+				ast_copy_string(fn, "digits/millions", sizeof(fn));
 			}
 			num %= 1000000;
 		} else {
@@ -2396,14 +2396,14 @@
 
 	while(!res && (num || playh)) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/lop");
+			ast_copy_string(fn, "digits/lop", sizeof(fn));
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (playh) {
-			snprintf(fn, sizeof(fn), "digits/roi");
+			ast_copy_string(fn, "digits/roi", sizeof(fn));
 			playh = 0;
 		} else if (num < 100) {
 			if ((num <= 20) || ((num % 10) == 1)) {
@@ -2422,25 +2422,25 @@
 			if (res)
 				return res;
 			num = num % 1000;
-			snprintf(fn, sizeof(fn), "digits/pan");
+			ast_copy_string(fn, "digits/pan", sizeof(fn));
 		} else if (num < 100000) { /* 100,000 */
 			res = ast_say_number_full_th(chan, num / 10000, ints, language, audiofd, ctrlfd);
 			if (res)
 				return res;
 			num = num % 10000;
-			snprintf(fn, sizeof(fn), "digits/muan");
+			ast_copy_string(fn, "digits/muan", sizeof(fn));
 		} else if (num < 1000000) { /* 1,000,000 */
 			res = ast_say_number_full_th(chan, num / 100000, ints, language, audiofd, ctrlfd);
 			if (res)
 				return res;
 			num = num % 100000;
-			snprintf(fn, sizeof(fn), "digits/san");
+			ast_copy_string(fn, "digits/san", sizeof(fn));
 		} else {
 			res = ast_say_number_full_th(chan, num / 1000000, ints, language, audiofd, ctrlfd);
 			if (res)
 				return res;
 			num = num % 1000000;
-			snprintf(fn, sizeof(fn), "digits/larn");
+			ast_copy_string(fn, "digits/larn", sizeof(fn));
 		}
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
@@ -2480,7 +2480,7 @@
 	
 	while (!res && num) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus"); /* kind of senseless for enumerations, but our best effort for error checking */
+			ast_copy_string(fn, "digits/minus", sizeof(fn)); /* kind of senseless for enumerations, but our best effort for error checking */
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
@@ -2506,9 +2506,9 @@
 			if (res)
 				return res;
 			if (num) {
-				snprintf(fn, sizeof(fn), "digits/hundred");
+				ast_copy_string(fn, "digits/hundred", sizeof(fn));
 			} else {
-				snprintf(fn, sizeof(fn), "digits/h-hundred");
+				ast_copy_string(fn, "digits/h-hundred", sizeof(fn));
 			}
 		} else if (num < 1000000) {
 			int thousands = num / 1000;
@@ -2519,9 +2519,9 @@
 			if (res)
 				return res;
 			if (num) {					
-				snprintf(fn, sizeof(fn), "digits/thousand");
+				ast_copy_string(fn, "digits/thousand", sizeof(fn));
 			} else {
-				snprintf(fn, sizeof(fn), "digits/h-thousand");
+				ast_copy_string(fn, "digits/h-thousand", sizeof(fn));
 			}
 			t = 1;
 		} else if (num < 1000000000) {
@@ -2532,9 +2532,9 @@
 			if (res)
 				return res;
 			if (num) {					
-				snprintf(fn, sizeof(fn), "digits/million");
+				ast_copy_string(fn, "digits/million", sizeof(fn));
 			} else {
-				snprintf(fn, sizeof(fn), "digits/h-million");
+				ast_copy_string(fn, "digits/h-million", sizeof(fn));
 			}
 		} else if (num < INT_MAX) {
 			int billions = num / 1000000000;
@@ -2544,12 +2544,12 @@
 			if (res)
 				return res;
 			if (num) {					
-				snprintf(fn, sizeof(fn), "digits/billion");
+				ast_copy_string(fn, "digits/billion", sizeof(fn));
 			} else {
-				snprintf(fn, sizeof(fn), "digits/h-billion");
+				ast_copy_string(fn, "digits/h-billion", sizeof(fn));
 			}
 		} else if (num == INT_MAX) {
-			snprintf(fn, sizeof(fn), "digits/h-last");
+			ast_copy_string(fn, "digits/h-last", sizeof(fn));
 			num = 0;
 		} else {
 			ast_debug(1, "Number '%d' is too big for me\n", num);
@@ -2591,14 +2591,14 @@
 
 	while (!res && num) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus"); /* kind of senseless for enumerations, but our best effort for error checking */
+			ast_copy_string(fn, "digits/minus", sizeof(fn)); /* kind of senseless for enumerations, but our best effort for error checking */
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (num < 100 && t) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			t = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/h-%d%s", num, gender);
@@ -2619,12 +2619,12 @@
 			int hundreds = num / 100;
 			num = num % 100;
 			if (hundreds == 1) {
-				snprintf(fn, sizeof(fn), "digits/1N");
+				ast_copy_string(fn, "digits/1N", sizeof(fn));
 			} else {
 				snprintf(fn, sizeof(fn), "digits/%d", hundreds);
 			}
 			if (num) {					
-				snprintf(fna, sizeof(fna), "digits/hundred");
+				ast_copy_string(fna, "digits/hundred", sizeof(fna));
 			} else {
 				snprintf(fna, sizeof(fna), "digits/h-hundred%s", gender);
 			}
@@ -2634,11 +2634,11 @@
 			num = num % 1000;
 			if (thousands == 1) {
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/1N");
-					snprintf(fna, sizeof(fna), "digits/thousand");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
+					ast_copy_string(fna, "digits/thousand", sizeof(fna));
 				} else {
 					if (t) {
-						snprintf(fn, sizeof(fn), "digits/1N");
+						ast_copy_string(fn, "digits/1N", sizeof(fn));
 						snprintf(fna, sizeof(fna), "digits/h-thousand%s", gender);
 					} else {
 						snprintf(fn, sizeof(fn), "digits/h-thousand%s", gender);
@@ -2650,7 +2650,7 @@
 					return res;
 				}
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					snprintf(fn, sizeof(fn), "digits/h-thousand%s", gender);
 				}
@@ -2661,10 +2661,10 @@
 			num = num % 1000000;
 			if (millions == 1) {
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/1F");
-					snprintf(fna, sizeof(fna), "digits/million");
+					ast_copy_string(fn, "digits/1F", sizeof(fn));
+					ast_copy_string(fna, "digits/million", sizeof(fna));
 				} else {
-					snprintf(fn, sizeof(fn), "digits/1N");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
 					snprintf(fna, sizeof(fna), "digits/h-million%s", gender);
 				}
 			} else {
@@ -2673,7 +2673,7 @@
 					return res;
 				}
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/millions");
+					ast_copy_string(fn, "digits/millions", sizeof(fn));
 				} else {
 					snprintf(fn, sizeof(fn), "digits/h-million%s", gender);
 				}
@@ -2684,10 +2684,10 @@
 			num = num % 1000000000;
 			if (billions == 1) {
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/1F");
-					snprintf(fna, sizeof(fna), "digits/milliard");
+					ast_copy_string(fn, "digits/1F", sizeof(fn));
+					ast_copy_string(fna, "digits/milliard", sizeof(fna));
 				} else {
-					snprintf(fn, sizeof(fn), "digits/1N");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
 					snprintf(fna, sizeof(fna), "digits/h-milliard%s", gender);
 				}
 			} else {
@@ -2695,7 +2695,7 @@
 				if (res)
 					return res;
 				if (num) {					
-					snprintf(fn, sizeof(fna), "digits/milliards");
+					ast_copy_string(fn, "digits/milliards", sizeof(fna));
 				} else {
 					snprintf(fn, sizeof(fna), "digits/h-milliard%s", gender);
 				}
@@ -2754,14 +2754,14 @@
 
 	while (!res && num) {
 		if (num < 0) {
-			snprintf(fn, sizeof(fn), "digits/minus"); /* kind of senseless for enumerations, but our best effort for error checking */
+			ast_copy_string(fn, "digits/minus", sizeof(fn)); /* kind of senseless for enumerations, but our best effort for error checking */
 			if ( num > INT_MIN ) {
 				num = -num;
 			} else {
 				num = 0;
 			}	
 		} else if (num < 100 && t) {
-			snprintf(fn, sizeof(fn), "digits/and");
+			ast_copy_string(fn, "digits/and", sizeof(fn));
 			t = 0;
 		} else if (num < 20) {
 			snprintf(fn, sizeof(fn), "digits/h-%d%s", num, gender);
@@ -2782,12 +2782,12 @@
 			int hundreds = num / 100;
 			num = num % 100;
 			if (hundreds == 1) {
-				snprintf(fn, sizeof(fn), "digits/1N");
+				ast_copy_string(fn, "digits/1N", sizeof(fn));
 			} else {
 				snprintf(fn, sizeof(fn), "digits/%d", hundreds);
 			}
 			if (num) {					
-				snprintf(fna, sizeof(fna), "digits/hundred");
+				ast_copy_string(fna, "digits/hundred", sizeof(fna));
 			} else {
 				snprintf(fna, sizeof(fna), "digits/h-hundred%s", gender);
 			}
@@ -2797,11 +2797,11 @@
 			num = num % 1000;
 			if (thousands == 1) {
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/1N");
-					snprintf(fna, sizeof(fna), "digits/thousand");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
+					ast_copy_string(fna, "digits/thousand", sizeof(fna));
 				} else {
 					if (t) {
-						snprintf(fn, sizeof(fn), "digits/1N");
+						ast_copy_string(fn, "digits/1N", sizeof(fn));
 						snprintf(fna, sizeof(fna), "digits/h-thousand%s", gender);
 					} else {
 						snprintf(fn, sizeof(fn), "digits/h-thousand%s", gender);
@@ -2813,7 +2813,7 @@
 					return res;
 				}
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/thousand");
+					ast_copy_string(fn, "digits/thousand", sizeof(fn));
 				} else {
 					snprintf(fn, sizeof(fn), "digits/h-thousand%s", gender);
 				}
@@ -2824,10 +2824,10 @@
 			num = num % 1000000;
 			if (millions == 1) {
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/1F");
-					snprintf(fna, sizeof(fna), "digits/million");
+					ast_copy_string(fn, "digits/1F", sizeof(fn));
+					ast_copy_string(fna, "digits/million", sizeof(fna));
 				} else {
-					snprintf(fn, sizeof(fn), "digits/1N");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
 					snprintf(fna, sizeof(fna), "digits/h-million%s", gender);
 				}
 			} else {
@@ -2836,7 +2836,7 @@
 					return res;
 				}
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/millions");
+					ast_copy_string(fn, "digits/millions", sizeof(fn));
 				} else {
 					snprintf(fn, sizeof(fn), "digits/h-million%s", gender);
 				}
@@ -2847,10 +2847,10 @@
 			num = num % 1000000000;
 			if (billions == 1) {
 				if (num) {					
-					snprintf(fn, sizeof(fn), "digits/1F");
-					snprintf(fna, sizeof(fna), "digits/milliard");
+					ast_copy_string(fn, "digits/1F", sizeof(fn));
+					ast_copy_string(fna, "digits/milliard", sizeof(fna));
 				} else {
-					snprintf(fn, sizeof(fn), "digits/1N");
+					ast_copy_string(fn, "digits/1N", sizeof(fn));
 					snprintf(fna, sizeof(fna), "digits/h-milliard%s", gender);
 				}
 			} else {
@@ -2858,7 +2858,7 @@
 				if (res)
 					return res;
 				if (num) {					
-					snprintf(fn, sizeof(fna), "digits/milliards");
+					ast_copy_string(fn, "digits/milliards", sizeof(fna));
 				} else {
 					snprintf(fn, sizeof(fna), "digits/h-milliard%s", gender);
 				}
@@ -3153,7 +3153,7 @@
 	if (!res) {
 		snprintf(fn, sizeof(fn), "digits/day-%d", tm.tm_wday);
 		res = ast_streamfile(chan, fn, lang);
-		snprintf(fn, sizeof(fn), "digits/tee");
+		ast_copy_string(fn, "digits/tee", sizeof(fn));
 		res = ast_streamfile(chan, fn, lang);
 		if (!res)
 			res = ast_waitstream(chan, ints);
@@ -3163,7 +3163,7 @@
 	if (!res)
 		res = ast_waitstream(chan, ints);
 	if (!res) {
-		snprintf(fn, sizeof(fn), "digits/duan");
+		ast_copy_string(fn, "digits/duan", sizeof(fn));
 		res = ast_streamfile(chan, fn, lang);
 		snprintf(fn, sizeof(fn), "digits/mon-%d", tm.tm_mon);
 		res = ast_streamfile(chan, fn, lang);
@@ -3171,7 +3171,7 @@
 			res = ast_waitstream(chan, ints);
 	}
 	if (!res){
-		snprintf(fn, sizeof(fn), "digits/posor");
+		ast_copy_string(fn, "digits/posor", sizeof(fn));
 		res = ast_streamfile(chan, fn, lang);
 		res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
 	}	
@@ -3309,7 +3309,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -3367,9 +3367,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -3557,7 +3557,7 @@
 				/* 12-Hour */
 				res = wait_file(chan,ints,"digits/oclock",lang);
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -3593,9 +3593,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -3758,7 +3758,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -3793,9 +3793,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -3937,7 +3937,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/24");
+					ast_copy_string(nextmsg, "digits/24", sizeof(nextmsg));
 				snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour);
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
@@ -3945,7 +3945,7 @@
 			case 'k':
 				/* 24-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/24");
+					ast_copy_string(nextmsg, "digits/24", sizeof(nextmsg));
 				snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour);
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
@@ -4168,9 +4168,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -4315,7 +4315,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -4530,7 +4530,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -4557,9 +4557,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -4741,7 +4741,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -4767,9 +4767,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 					res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -4974,7 +4974,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -4997,9 +4997,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -5166,7 +5166,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg, sizeof(nextmsg), "digits/t-12");
+					ast_copy_string(nextmsg, "digits/t-12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg, sizeof(nextmsg), "digits/t-%d", tm.tm_hour - 12);
 				else 
@@ -5199,9 +5199,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg, sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg, sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan, ints, nextmsg, lang);
 				break;
 			case 'Q':
@@ -5705,7 +5705,7 @@
 			case 'l':
 				/* 12-Hour */
 				if (tm.tm_hour == 0)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/12");
+					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
 				else if (tm.tm_hour > 12)
 					snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
 				else
@@ -5760,9 +5760,9 @@
 			case 'p':
 				/* AM/PM */
 				if (tm.tm_hour > 11)
-					snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+					ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 				else
-					snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+					ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 				res = wait_file(chan,ints,nextmsg,lang);
 				break;
 			case 'Q':
@@ -6429,7 +6429,7 @@
 			res = ast_waitstream(chan, ints);
 	}
 	if (!res){
-		snprintf(fn, sizeof(fn), "digits/posor");
+		ast_copy_string(fn, "digits/posor", sizeof(fn));
 		res = ast_streamfile(chan, fn, lang);
 		res = ast_say_number(chan, tm.tm_year + 1900 + 543, ints, lang, (char *) NULL);
 	}	
@@ -6440,7 +6440,7 @@
 	if (!hour)
 		hour = 24;
 	if (!res){
-		snprintf(fn, sizeof(fn), "digits/wela");
+		ast_copy_string(fn, "digits/wela", sizeof(fn));
 		res = ast_streamfile(chan, fn, lang);
 	}	
 	if (!res)
@@ -6633,14 +6633,14 @@
 	}	/* Otherwise, it was today */
 	if (!strcasecmp(lang, "pt_BR")) {
 		if (tm.tm_hour > 1) {
-			snprintf(fn, sizeof(fn), "digits/pt-as");
+			ast_copy_string(fn, "digits/pt-as", sizeof(fn));
 		} else {
-			snprintf(fn, sizeof(fn), "digits/pt-a");
+			ast_copy_string(fn, "digits/pt-a", sizeof(fn));
 		}
 		if (!res)
 			res = wait_file(chan, ints, fn, lang);
 	} else {
-		snprintf(fn, sizeof(fn), "digits/pt-ah");
+		ast_copy_string(fn, "digits/pt-ah", sizeof(fn));
 		if (!res)
 			res = wait_file(chan, ints, fn, lang);
 		if (tm.tm_hour != 1)
@@ -6713,7 +6713,7 @@
 
  
 	if (!num) {
-		snprintf(fn, sizeof(fn), "digits/0");
+		ast_copy_string(fn, "digits/0", sizeof(fn));
 		res = ast_streamfile(chan, fn, chan->language);
 		if (!res)
 			return  ast_waitstream(chan, ints);
@@ -6730,14 +6730,14 @@
 			num -= ((num / 10) * 10); 
 		} else if (num < 200) {
 			/* 100 < num < 200 */
-			snprintf(fn, sizeof(fn), "digits/hundred-100");
+			ast_copy_string(fn, "digits/hundred-100", sizeof(fn));
 			num -= ((num / 100) * 100);
 		}else if (num < 1000) {
 			/* 200 < num < 1000 */
 			snprintf(fn, sizeof(fn), "digits/hundred-%d", (num/100)*100);
 			num -= ((num / 100) * 100);
 		}else if (num < 2000){
-			snprintf(fn, sizeof(fn), "digits/xilia");
+			ast_copy_string(fn, "digits/xilia", sizeof(fn));
 			num -= ((num / 1000) * 1000);
 		}
 		else {
@@ -6747,14 +6747,14 @@
 				if (res)
 					return res;
 				num = num % 1000;
-				snprintf(fn, sizeof(fn), "digits/thousands");
+				ast_copy_string(fn, "digits/thousands", sizeof(fn));
 			}  else {
 				if (num < 1000000000) { /* 1,000,000,000 */
 					res = ast_say_number_full_gr(chan, (num / 1000000), ints, chan->language ,audiofd, ctrlfd);
 					if (res)
 						return res;
 					num = num % 1000000;
-					snprintf(fn, sizeof(fn), "digits/millions");
+					ast_copy_string(fn, "digits/millions", sizeof(fn));
 				} else {
 					ast_debug(1, "Number '%d' is too big for me\n", num);
 					res = -1;
@@ -6992,9 +6992,9 @@
 		case 'p':
 			/* AM/PM */
 			if (tm.tm_hour > 11)
-				snprintf(nextmsg,sizeof(nextmsg), "digits/p-m");
+				ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
 			else
-				snprintf(nextmsg,sizeof(nextmsg), "digits/a-m");
+				ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
 			res = wait_file(chan,ints,nextmsg,lang);
 			break;
 		case 'Q':
@@ -7054,12 +7054,12 @@
 			break;
 		case 'S':
 			/* Seconds */
-			snprintf(nextmsg,sizeof(nextmsg), "digits/kai");
+			ast_copy_string(nextmsg, "digits/kai", sizeof(nextmsg));
 			res = wait_file(chan,ints,nextmsg,lang);
 			if (!res)
 				res = ast_say_number_full_gr(chan, tm.tm_sec, ints, lang, -1, -1);
 			if (!res)
-				snprintf(nextmsg,sizeof(nextmsg), "digits/seconds");
+				ast_copy_string(nextmsg, "digits/seconds", sizeof(nextmsg));
 			res = wait_file(chan,ints,nextmsg,lang);
 			break;
 		case 'T':
Index: res/res_config_odbc.c
===================================================================
--- res/res_config_odbc.c	(revision 84122)
+++ res/res_config_odbc.c	(working copy)
@@ -496,7 +496,7 @@
 	}
 	newval = va_arg(aq, const char *);
 	snprintf(keys, sizeof(keys), "%s", newparam);
-	snprintf(vals, sizeof(vals), "?");
+	ast_copy_string(vals, "?", sizeof(vals));
 	while ((newparam = va_arg(aq, const char *))) {
 		snprintf(keys + strlen(keys), sizeof(keys) - strlen(keys), ", %s", newparam);
 		snprintf(vals + strlen(vals), sizeof(vals) - strlen(vals), ", ?");
