Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 8a04142a85890993c70e73a5f91ee67b > files > 14

MySQL-4.1.11-1.6.102mdk.src.rpm

--- mysql-4.1.12/sql/item_timefunc.cc.cve-2006-3081	2005-05-13 05:32:46.000000000 -0600
+++ mysql-4.1.12/sql/item_timefunc.cc	2006-06-22 13:08:02.776055954 -0600
@@ -2738,9 +2738,9 @@ void Item_func_str_to_date::fix_length_a
   cached_field_type= MYSQL_TYPE_STRING;
   max_length= MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
   cached_timestamp_type= MYSQL_TIMESTAMP_NONE;
-  if ((const_item= args[1]->const_item()))
+  format= args[1]->val_str(&format_str);
+  if (!args[1]->null_value && (const_item= args[1]->const_item()))
   {
-    format= args[1]->val_str(&format_str);
     cached_format_type= get_date_time_result_type(format->ptr(),
                                                   format->length());
     switch (cached_format_type) {