Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Sep 26, 2017 5:32 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: buffer overflow in php.c
PostPosted: Thu Nov 26, 2009 1:00 pm 
Offline

Joined: Thu Nov 26, 2009 12:50 pm
Posts: 1
Hi,

I am new to this board, and a new user of raydium.

I install it using the source code from the svn, but when i tried to launch test6 demo an buffer overflow happened.
This is due to a bad memory allocation a the line 341 of raydium/php.c :
path=malloc(strlen(PHP_INI_PATH));

strlen returns only the number of chars in the string, but it does not include the '\0' chars.
and at the next line, you use this new allocated string :
strcpy(path,PHP_INI_PATH);

but strcpy needs to store a '\0' so you need to replace the line 341 by :
path=malloc(strlen(PHP_INI_PATH)+1);


Top
 Profile  
 
PostPosted: Thu Nov 26, 2009 2:43 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Stupid error ... nice spot, fixed in rev 928.

Thanks !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group