Fix integer overflow after strlen().
https://github.com/perl5-dbi/dbi/pull/190

Detect atoi() integer overflow.
https://github.com/perl5-dbi/dbi/pull/191

Index: DBI.xs
--- DBI.xs.orig
+++ DBI.xs
@@ -4144,7 +4144,7 @@ preparse(SV *dbh, const char *statement, IV ps_return,
         we add support for odbc escape sequences.
 */
     int idx = 1;
-    int sln;
+    STRLEN sln;
 
     char in_quote = '\0';
     char in_comment = '\0';
@@ -4358,7 +4358,7 @@ preparse(SV *dbh, const char *statement, IV ps_return,
         else if (isDIGIT(*src)) {   /* :1 */
             const int pln = atoi(src);
 
-            if (pln > 99999 || pln <= 0) {
+            if (strspn(src, "0123456789") > 5 || pln > 99999 || pln <= 0) {
                 char buf[99];
                 sprintf(buf, "preparse found :p%d which is outside the allowed range.", pln);
                 set_err_char(dbh, imp_xxh, "1", 1, buf, 0, "preparse");
