Robustness improvement:
  1. Use std::string instead of (char*) in main().
  2. Fix the replaceLastPartWithFile to remove memory leak and simplify the code.

Change-Id: If1421db1c9615c56cf7c4629245c7f028e9696bc
1 file changed