I was pulling into a parking spot and my vehicle suddenly accelerated. I slammed on the brakes and the car did stop, but not before hitting a railing in front of me. There were also trees close to the railing, so the camera should have detected those as a barrier and I believe the veauto-braked, even if I had not hit the brakes. This is a safety concern because the vehicle would have plowed over any person in front of the vehicle.