06.09.2017, 08:25
The problem is more likely that your salt is not terminated with a null terminator. When you print a string memory is read until the next null terminator is found. If there isn't a null terminator at the end of the string then it'll just continue reading into adjacent memory where other variables are stored. That's called buffer overflow.
Do you mind showing your RandomString method?
Do you mind showing your RandomString method?