C or C++ : Using an insecure method