1. 18 Jul, 2011 4 commits
  2. 15 Jul, 2011 4 commits
    • Tor Didriksen's avatar
    • Tor Didriksen's avatar
      merge 5.0-security => 5.1-security · a72a9816
      Tor Didriksen authored
      a72a9816
    • Tor Didriksen's avatar
      Bug#12406055 BUFFER OVERFLOW OF VARIABLE 'BUFF' IN STRING::SET_REAL · cfe3489b
      Tor Didriksen authored
      The buffer was simply too small.
      In 5.5 and trunk, the size is 311 + 31,
      in 5.1 and below, the size is 331
      cfe3489b
    • Davi Arnaut's avatar
      Bug#12736295 Buffer overflow for variable converted_err with · 2aef0eda
      Davi Arnaut authored
                   non-latin1 server error message
      
      The problem was a one byte buffer overflow in the conversion
      of a error message between character sets. Ahead of explaining
      the problem further, some background information. Before an
      error message is sent to the user, the message is converted
      to the character set specified in the character_set_results
      variable. For various reasons, this conversion might cause
      the message to increase in length -- for example, if certain
      characters can't be represented in the result character set.
      
      If the final message length is greater than the maximum allowed
      length of a error message (MYSQL_ERRMSG_SIZE), the message
      is truncated. The message is also always null-terminated
      regardless of the character set. The problem arises from this
      null-termination. If a message length reached the maximum,
      the terminating null character would be placed one byte past
      the end of the message buffer.
      
      The solution is to reserve the end of the message buffer for
      the null character.
      2aef0eda
  3. 11 Jul, 2011 2 commits
  4. 07 Jul, 2011 6 commits
  5. 06 Jul, 2011 1 commit
  6. 05 Jul, 2011 2 commits
  7. 04 Jul, 2011 1 commit
  8. 03 Jul, 2011 2 commits
  9. 01 Jul, 2011 2 commits
  10. 30 Jun, 2011 3 commits
  11. 29 Jun, 2011 1 commit
  12. 21 Jun, 2011 1 commit
    • Alexander Nozdrin's avatar
      Patch for Bug 12652769 - 61470: CASE OPERATOR IN STORED ROUTINE RETAINS · 1c810152
      Alexander Nozdrin authored
      OLD VALUE OF INPUT PARAMETER.
      
      The user-visible problem was that CASE-control-flow function
      (not CASE-statement) misbehaved in stored routines under some
      circumstances. The problem resulted in a crash or wrong data
      returned. The error happened when expressions in CASE-function
      were not of the same character set.
      
      A CASE-function should return values of the same character set
      for all branches. Internally, that means a new Item-instance
      for the CONVERT(... USING <some charset>)-function is added
      to the item tree when needed. The problem was that such changes
      were not properly recorded using THD::change_item_tree(),
      thus dangling pointers remain in the item tree after
      THD::rollback_item_tree_changes(), which lead to undefined
      behavior (i.e. crash / wrong data) for subsequent executions of
      the stored routine.
      
      This bug was introduced by a patch for Bug 11753363
      (44793 - CHARACTER SETS: CASE CLAUSE, UCS2 OR UTF32, FAILURE).
      
      The fixed function is Item_func_case::fix_length_and_dec().
      New CONVERT-items are added in agg_item_set_converter(),
      which calls THD::change_item_tree().
      
      The problem was that an intermediate array was passed
      to agg_item_set_converter(). Thus, THD::change_item_tree() there
      was called on intermediate objects.
      
      Note: those intermediate objects are allocated on THD's
      memory root, so it's Ok to put them into "changed item lists".
      
      The fix is to track changes on the correct objects.
      1c810152
  13. 16 Jun, 2011 7 commits
  14. 15 Jun, 2011 4 commits