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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!