]> granicus.if.org Git - php/commitdiff
Fixed bug #23888 (Missing input validation for flags parameter)
authorIlia Alshanetsky <iliaa@php.net>
Fri, 30 May 2003 14:08:14 +0000 (14:08 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 30 May 2003 14:08:14 +0000 (14:08 +0000)
ext/mysql/php_mysql.c

index 19b5fbe89c6d33279f31baee55768d54f925b1f4..95ef068e30cc062a71b49142c5ce176e460b5d1d 100644 (file)
@@ -525,6 +525,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                                                }
                                                convert_to_string_ex(z_user);
                                                convert_to_string_ex(z_passwd);
+                                               convert_to_boolean_ex(z_new_link);
                                                user = Z_STRVAL_PP(z_user);
                                                passwd = Z_STRVAL_PP(z_passwd);
                                                new_link = Z_BVAL_PP(z_new_link);
@@ -535,6 +536,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                                                }
                                                convert_to_string_ex(z_user);
                                                convert_to_string_ex(z_passwd);
+                                               convert_to_long_ex(z_client_flags);
                                                user = Z_STRVAL_PP(z_user);
                                                passwd = Z_STRVAL_PP(z_passwd);
                                                client_flags = Z_LVAL_PP(z_client_flags);
@@ -547,6 +549,8 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                                        }
                                        convert_to_string_ex(z_user);
                                        convert_to_string_ex(z_passwd);
+                                       convert_to_boolean_ex(z_new_link);
+                                       convert_to_long_ex(z_client_flags);
                                        user = Z_STRVAL_PP(z_user);
                                        passwd = Z_STRVAL_PP(z_passwd);
                                        new_link = Z_BVAL_PP(z_new_link);