php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1174 SigSegv in ODBC handling
Submitted: 1999-02-22 04:43 UTC Modified: 1999-07-11 04:16 UTC
From: gody at master dot slon dot net Assigned:
Status: Closed Package: ODBC related
PHP Version: 3.0.6 OS: Linux
Private report: No CVE-ID: None
 [1999-02-22 04:43 UTC] gody at master dot slon dot net
php-3.0.6 with unified odbc (Adabas) sometimes (many times) crashes httpd (sig 11). 

With reverting unified ODBC to that from 3.0.5 solves problem for now.

I'm on to hunt this bug in the code, but if somebody already has a fix I would prefer this:)

SOLVED (How can I submit the patch ?):
in function PHP3_UODBC_DO_CONNECT
line: 1765 calculation of len variable is at least off by one byte.
I changed it from:
len = strlen(db) + strlen(uid) + strlen(pwd) + strlen(UODBC_NAME) + 5;
to
len = strlen(db) + strlen(uid) + strlen(pwd) + strlen(UODBC_NAME) + sizeof (cur_opt ) + 4 ; 

This is rather obvious from later code:
hashed_len = _php3_sprintf(hashed_details, "%s_%s_%s_%s_%d", UODBC_NAME, db,uid, pwd, cur_opt);
where cur_opt and four "_ " is printed into hashed_details
I only don't know if _php3_sprintf handles \0 on the end or should there be +5 for this also alocated. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-11 04:16 UTC] kara at cvs dot php dot net
Patch has been included.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC