Question
Both system() and execve() can be used to execute external programs. Why is system() unsafe while execve() is safe? Note, there might be multiple correct
Both system() and execve() can be used to execute external programs. Why is system() unsafe while execve() is safe?
Note, there might be multiple correct answers.
Group of answer choices
1.system() command mixes data and code. This is what that can make it unsafe.
2.The execve() function will never mix code and data together, so there is no chance for any untrusted data to become code.
3. In execve() function, the code, i.e., the name of the program, has to be provided in the first argument, while the data need to be provided in the second argument.
4. The execve() function separate the code from data.
5. In the system() function, there is no chance for any untrusted data to become code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started