• unknown's avatar
    Bug#20894 Reproducible MySQL client segmentation fault · 08d43705
    unknown authored
     - Add two null bytes in  "buff" variable allowing us to call
       get_arg two times also for strings longer than sizeof(buff) 
    
    
    client/mysql.cc:
      Make sure there are _two_ zero bytes at the end of buff, to allow 'get_arg' to be
      called twice on long strings. The first time it will mark end of string with a
      zero and the second time it will "skip ahead" to the first zero, and the find the
      second one indicating end of buff.
    mysql-test/r/mysql.result:
      Update test results
    mysql-test/t/mysql.test:
      Add tests for "com_connect" function in mysql
      Add test reported in bug
    08d43705
mysql.cc 107 KB