mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -333,7 +333,7 @@ static int aMYSQL_connect(struct ast_channel *chan, char *data)
|
||||
}
|
||||
|
||||
ctimeout = pbx_builtin_getvar_helper(chan, "MYSQL_TIMEOUT");
|
||||
if (ctimeout && sscanf(ctimeout, "%d", &timeout) == 1) {
|
||||
if (ctimeout && sscanf(ctimeout, "%30d", &timeout) == 1) {
|
||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (void *)&timeout);
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ static int aMYSQL_nextresult(struct ast_channel *chan, char *data)
|
||||
int connid = -1;
|
||||
|
||||
AST_NONSTANDARD_APP_ARGS(args, data, ' ');
|
||||
sscanf(args.connid, "%d", &connid);
|
||||
sscanf(args.connid, "%30d", &connid);
|
||||
|
||||
if (args.argc != 3 || connid <= 0) {
|
||||
ast_log(LOG_WARNING, "missing some arguments\n");
|
||||
@@ -451,7 +451,7 @@ static int aMYSQL_fetch(struct ast_channel *chan, char *data)
|
||||
|
||||
parse = ast_strdupa(data);
|
||||
AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
|
||||
sscanf(args.fetchid, "%d", &resultid);
|
||||
sscanf(args.fetchid, "%30d", &resultid);
|
||||
|
||||
if (args.resultvar && (resultid >= 0) ) {
|
||||
if ((mysqlres = find_identifier(resultid, AST_MYSQL_ID_RESID)) != NULL) {
|
||||
|
Reference in New Issue
Block a user