[Asterisk-cvs] asterisk/apps app_record.c,1.23,1.24
markster at lists.digium.com
markster at lists.digium.com
Thu Oct 28 17:34:07 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv17443/apps
Modified Files:
app_record.c
Log Message:
Fix potential seg if someone doesn't specify an extension
Index: app_record.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_record.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- app_record.c 28 Oct 2004 19:08:02 -0000 1.23
+++ app_record.c 28 Oct 2004 21:37:18 -0000 1.24
@@ -86,7 +86,7 @@
/* The next few lines of code parse out the filename and header from the input string */
- if (!data) { /* no data implies no filename or anything is present */
+ if (!data || !ast_strlen_zero(data)) { /* no data implies no filename or anything is present */
ast_log(LOG_WARNING, "Record requires an argument (filename)\n");
return -1;
}
@@ -106,6 +106,10 @@
if (!ext)
ext = strchr(filename, ':');
}
+ if (!ext) {
+ ast_log(LOG_WARNING, "No extension specified to filename!\n");
+ return -1;
+ }
if (silstr) {
if ((sscanf(silstr, "%d", &i) == 1) && (i > -1))
More information about the svn-commits
mailing list