AST-2009-005
[asterisk/asterisk.git] / res / res_odbc.c
index 5a651df..2fec888 100644 (file)
@@ -771,7 +771,7 @@ static int load_odbc_config(void)
                                        if (ast_false(v->value))
                                                pooling = 1;
                                } else if (!strcasecmp(v->name, "limit")) {
-                                       sscanf(v->value, "%d", &limit);
+                                       sscanf(v->value, "%30d", &limit);
                                        if (ast_true(v->value) && !limit) {
                                                ast_log(LOG_WARNING, "Limit should be a number, not a boolean: '%s'.  Setting limit to 1023 for ODBC class '%s'.\n", v->value, cat);
                                                limit = 1023;
@@ -781,7 +781,7 @@ static int load_odbc_config(void)
                                                break;
                                        }
                                } else if (!strcasecmp(v->name, "idlecheck")) {
-                                       sscanf(v->value, "%d", &idlecheck);
+                                       sscanf(v->value, "%30u", &idlecheck);
                                } else if (!strcasecmp(v->name, "enabled")) {
                                        enabled = ast_true(v->value);
                                } else if (!strcasecmp(v->name, "pre-connect")) {