• Tatiana A. Nurnberg's avatar
    Bug#55436: buffer overflow in debug binary of dbug_buff in Field_new_decimal::store_value · ccbc24b4
    Tatiana A. Nurnberg authored
    There were some misunderstandings about parameters pertaining to buffer-size.
    
    Patches fixes the reported off by one and
    clarifies the documentation.
    
    mysql-test/r/type_newdecimal.result:
      add test
    mysql-test/t/type_newdecimal.test:
      add test
    sql/field.cc:
      adjust buffer size by one to account for terminator.
    sql/my_decimal.cc:
      adjust buffer size by one to account for terminator.
      clarify needs in comments.
    sql/my_decimal.h:
      clarify buffer-size needs to prevent future off-by-one bugs.
    strings/decimal.c:
      clarify buffer-size needs and parameters to prevent future off-by-one bugs
    ccbc24b4
decimal.c 86.1 KB