fix one memory overflow when malloc