[asterisk-commits] seanbright: branch 1.4 r114191 - /branches/1.4/apps/app_chanspy.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 17 05:51:21 CDT 2008


Author: seanbright
Date: Thu Apr 17 05:51:20 2008
New Revision: 114191

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114191
Log:
Make sure we have enough room for the recording's filename.

Modified:
    branches/1.4/apps/app_chanspy.c

Modified: branches/1.4/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_chanspy.c?view=diff&rev=114191&r1=114190&r2=114191
==============================================================================
--- branches/1.4/apps/app_chanspy.c (original)
+++ branches/1.4/apps/app_chanspy.c Thu Apr 17 05:51:20 2008
@@ -728,7 +728,7 @@
 	}
 
 	if (recbase) {
-		char filename[512];
+		char filename[PATH_MAX];
 
 		snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
 		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {
@@ -813,7 +813,7 @@
 	}
 
 	if (recbase) {
-		char filename[512];
+		char filename[PATH_MAX];
 
 		snprintf(filename, sizeof(filename), "%s/%s.%d.raw", ast_config_AST_MONITOR_DIR, recbase, (int) time(NULL));
 		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {




More information about the asterisk-commits mailing list