• Martin Hansson's avatar
    Bug#44684: valgrind reports invalid reads in · 0d460bcd
    Martin Hansson authored
    Item_func_spatial_collection::val_str
            
    When the concatenation function for geometry data collections
    reads the binary data it was not rigorous in checking that there
    is data available, leading to invalid reads and crashes.
    Fixed by making checking stricter.
    
    
    mysql-test/r/gis.result:
      Bug#44684: Test result
    mysql-test/t/gis.test:
      Bug#44684: Test case
    sql/item_geofunc.cc:
      Bug#44684: fix(es)
      - Check that there are 4 bytes available for type code.
      - Check that there is at least one point available for linestring.
      - Check that there are at least 2 points in a polygon and
        data for all the points.
    0d460bcd
item_geofunc.cc 16.7 KB