state_t state_arg_1 = sm_ctxt->get_state (stmt, arg_1);
if (state_arg_1 == m_stop)
return;
- if (!(is_constant_fd_p (state_arg_1) || is_valid_fd_p (state_arg_1)))
+ if (!(is_constant_fd_p (state_arg_1) || is_valid_fd_p (state_arg_1)
+ || state_arg_1 == m_start))
{
check_for_open_fd (sm_ctxt, node, stmt, call, callee_fndecl,
DIRS_READ_WRITE);
case DUP_1:
if (lhs)
{
- if (is_constant_fd_p (state_arg_1))
+ if (is_constant_fd_p (state_arg_1) || state_arg_1 == m_start)
sm_ctxt->set_next_state (stmt, lhs, m_unchecked_read_write);
else
sm_ctxt->set_next_state (stmt, lhs,
if (state_arg_2 == m_stop)
return;
/* Check if -1 was passed as second argument to dup2. */
- if (!(is_constant_fd_p (state_arg_2) || is_valid_fd_p (state_arg_2)))
+ if (!(is_constant_fd_p (state_arg_2) || is_valid_fd_p (state_arg_2)
+ || state_arg_2 == m_start))
{
sm_ctxt->warn (
node, stmt, arg_2,
file descriptor i.e the first argument. */
if (lhs)
{
- if (is_constant_fd_p (state_arg_1))
+ if (is_constant_fd_p (state_arg_1) || state_arg_1 == m_start)
sm_ctxt->set_next_state (stmt, lhs, m_unchecked_read_write);
else
sm_ctxt->set_next_state (stmt, lhs,