1
- /* Generated by re2c 0.13.5 on Sat Jun 4 18:42:25 2011 */
1
+ /* Generated by re2c 0.13.5 on Wed Apr 18 22:30:06 2012 */
2
2
#line 1 "ext/pdo/pdo_sql_parser.re"
3
3
/*
4
4
+----------------------------------------------------------------------+
@@ -569,7 +569,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
569
569
param -> param_type TSRMLS_CC )) {
570
570
/* bork */
571
571
ret = -1 ;
572
- strcpy (stmt -> error_code , stmt -> dbh -> error_code );
572
+ strncpy (stmt -> error_code , stmt -> dbh -> error_code , 6 );
573
573
if (buf ) {
574
574
efree (buf );
575
575
}
@@ -592,6 +592,9 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
592
592
plc -> freeq = 0 ;
593
593
break ;
594
594
595
+ case IS_BOOL :
596
+ convert_to_long (param -> parameter );
597
+
595
598
case IS_LONG :
596
599
case IS_DOUBLE :
597
600
convert_to_string (param -> parameter );
@@ -600,16 +603,14 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
600
603
plc -> freeq = 0 ;
601
604
break ;
602
605
603
- case IS_BOOL :
604
- convert_to_long (param -> parameter );
605
606
default :
606
607
convert_to_string (param -> parameter );
607
608
if (!stmt -> dbh -> methods -> quoter (stmt -> dbh , Z_STRVAL_P (param -> parameter ),
608
609
Z_STRLEN_P (param -> parameter ), & plc -> quoted , & plc -> qlen ,
609
610
param -> param_type TSRMLS_CC )) {
610
611
/* bork */
611
612
ret = -1 ;
612
- strcpy (stmt -> error_code , stmt -> dbh -> error_code );
613
+ strncpy (stmt -> error_code , stmt -> dbh -> error_code , 6 );
613
614
goto clean_up ;
614
615
}
615
616
plc -> freeq = 1 ;
0 commit comments