bugSystem V style init programs - Bugs: bug #35866, init: possible overflow in...

 
 

bug #35866: init: possible overflow in init_buildenv

Submitted by:  None
Submitted on:  Fri 16 Mar 2012 09:56:12 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Dr. Werner Fink <wfink>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 19 Mar 2012 12:51:02 PM UTC, comment #1:

yep

Dr. Werner Fink <wfink>
Project AdministratorIn charge of this item.
Fri 16 Mar 2012 09:56:12 PM UTC, original submission:

If (child == 0) and extra environment is filled fully (16 variables), n+1 pointers must be calloc'd instead of n.

> for (n = 0; environ[n]; n++)
> ;


n = quantity of environment variables.

> n += NR_EXTRA_ENV;


n += 16

> if (child)
> n += 8;


Will not be executed.

> while ((e = (char*)calloc(n, sizeof(char ))) == NULL) {


There is no room for NULL element.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 19 Mar 2012 12:52:36 PM UTCwfinkOpen/ClosedOpen=>Closed
Mon 19 Mar 2012 12:51:02 PM UTCwfinkStatusNone=>Fixed
  Assigned toNone=>wfink

Back to the top


Powered by Savane 3.1-cleanup1