Changeset 289


Ignore:
Timestamp:
Jun 16, 2010, 10:28:44 PM (14 years ago)
Author:
katerina
Message:

Fix for ticket #212 (warning on NULL argv in execve)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/Changelog

    r286 r289  
     12.7.2:
     2        * sh_extern.c: As reported by T. Luettgert, gcc 4.4.4 on Fedora 13
     3          will throw a warning if execve is called with a NULL argv pointer.
     4          Need to provide a dummy argp[].
     5
    162.7.1:
    27        * samhain_kmem.c: fix compile problems
  • trunk/src/sh_extern.c

    r275 r289  
    132132
    133133  /* Linux, HP-UX and FreeBSD will happily accept envp = argp = NULL
     134   * (newer Linuxes (gcc 4.4.4) warn on argp == NULL, but accept it,
     135   * as reported by T. Luettgert)
    134136   * Solaris (and probably some other Unices)
    135137   *         needs a valid *envp[] with envp[0] = NULL;
     
    420422                  do {
    421423                    val_return = execve (pname,
    422                                          (task->argc == 0) ? NULL : task->argv,
     424                                         (task->argc == 0) ? argp : task->argv,
    423425                                         (task->envc == 0) ? NULL : task->envv
    424426                                         );
Note: See TracChangeset for help on using the changeset viewer.