Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:56:59+00:00 2026-06-03T13:56:59+00:00

I over heard someone saying that system() call from libc is not safe. One

  • 0

I over heard someone saying that system() call from libc is not safe.

One reason i can think of is that it launches shell utility e.g. /bin/bash and if system("rm -rf $input") is started and $input is un-sanitized user input then it can potentially wreck havoc if $input=”/”.
What are the other reasons?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:57:01+00:00Added an answer on June 3, 2026 at 1:57 pm

    In general, “safe” is by comparison to the exec family of system calls (execve() being the lowest level standard one); involving a shell not only means problems with unsanitized data but also with $PATH (do you know what you are executing?) and with $IFS (this is a fun one: if someone can change $IFS on you, the shell won’t parse things the way you expect).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Time and time again I've read and heard people frustrated over Maven and how
I'm breaking my head over this one. I'm kind of new in android development.
I think I may be way in over my head here... I'm using a
I'm fairly new to C++, and I'm likely in over my head, but that's
I need a bit of inspiration from somewhere and hoping someone, anyone could help.
I need to pull data from two tables, and it's a bit over my
Can someone provide a simple demo? I can't seem to get my head around
So I have this query written by someone else that I'm trying to refactor,
I've been scratching my head over this error for sometime now but can't work
Im wondering if someone can help me understand the best way for me to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.