Menu

#52 execl terminates with NULL

closed-fixed
None
5
2005-01-30
2005-01-29
No

Hi,

the execlp argument list needs to be terminated with NULL.
(0 is not NULL in the va_list case)

Ciao, Marcus

Discussion

  • Marcus Meissner

    Marcus Meissner - 2005-01-29

    cscope-null.patch

     
  • Hans-Bernhard Broeker

    • assigned_to: nobody --> broeker
    • status: open --> closed-fixed
     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    Thanks for spotting this.

    Actually, IIRC, even NULL isn't really safe --- C compilers
    can legally #define NULL 0. The pointer context has to be
    established at the point of usage, which means only a
    full-fledged (void *)0 will do.

    Change going into CVS right away.

     
  • Marcus Meissner

    Marcus Meissner - 2005-01-30

    Logged In: YES
    user_id=48092

    question is also why doesnt it use the
    libc popen on Linux.

    Ciao, Marcus

     
  • Hans-Bernhard Broeker

    Logged In: YES
    user_id=27517

    No idea. Please keep in mind that this is code whose first
    version predates Linus' birth. I.e. it's probably just
    "hysterical raisins" ;-)

     

Log in to post a comment.