• Kailasnath Nagarkar's avatar
    Bug #19984392 : MEDIUMINT: STACK BUFFER OVERFLOW IN PROTOCOL_TEXT::STORE_LONG · 322afb2c
    Kailasnath Nagarkar authored
    ISSUE: Queries with mediumint as column when operated with
    long long type of data results in buffer overflow in
    store_long function.
    
    The merging rule specified for (MYSQL_TYPE_LONGLONG
    MYSQL_TYPE_INT24) is MYSQL_TYPE_LONG. Due to this store_long
    function was getting called which resulted in buffer overflow.
    
    SOLUTION:
    The correct merging rule for (MYSQL_TYPE_LONGLONG,
    MYSQL_TYPE_INT24) should be MYSQL_TYPE_LONGLONG.
    So, instead of function store_long, function store_longlong
    is called which correctly handles the type MYSQL_TYPE_LONGLONG.
    
    External Bug #23645238 is a duplicate of this issue.
    322afb2c
field.cc 285 KB