Project

General

Profile

Bug #1235

NULL arg terminator in execl()/execle() is missing

Added by Anonymous almost 12 years ago. Updated almost 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

Some systems define NULL as a (void *) pointer, other systems just define it as 0.

On functions having a fixed number of arguments, this is not an issue. Thanks to the prototype, the NULL will be promoted to the right type to close the argument list.

But on functions with a variable number of arguments, if an integer object is used where a pointer is expected, bad things can happen. This is for instance the case on OpenBSD/amd64.

Here's a patch that fixes the execl()/execle() calls in Lighty 1.5 -SVN.

fix-sentinel.patch (2.04 KB) fix-sentinel.patch Fix for NULL-terminated argument lists -- Frank DENIS Anonymous, 2007-06-14 08:45

Associated revisions

Revision 1872 (diff)
Added by jan almost 12 years ago

fixed type-cast for NULL in execl() (fixes #1235), fix provided by Frank
DENIS

Revision 768a0d0e (diff)
Added by jan almost 12 years ago

fixed type-cast for NULL in execl() (fixes #1235), fix provided by Frank
DENIS

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1872 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 1916 (diff)
Added by jan over 11 years ago

added a sentinel around NULL in exec() (merged from [1872] from 1.4.x,
fixes #1235)

History

#1

Updated by jan over 11 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

fixed in r1916 for trunk and r1872 for 1.4.x

#2

Updated by Anonymous almost 11 years ago

  • Status changed from Fixed to Need Feedback
  • Resolution deleted (fixed)
#3

Updated by glen almost 11 years ago

  • Status changed from Need Feedback to Fixed
  • Resolution set to fixed

Also available in: Atom