• unknown's avatar
    Bug #27231: Server crash when dumping into outfile with long FIELDS ENCLOSED BY option · d59272fb
    unknown authored
    - Problem: data separators were copied to a fixed-size buffer
      on the stack; memcpy was used, without bounds checking; a
      server crash could result if long FIELDS ENCLOSED BY, etc.,
      was given
    - Fix: write the separators directly, instead of copying to
      a buffer first (in select_export::send_data())
    
    
    sql/sql_class.cc:
      In select_export::send_data(), write data separators
      directly, instead of copying into a fixed-size memory
      buffer before writing.  This avoids a buffer overflow
      when very large separators are specified.
    d59272fb
sql_class.cc 45.6 KB