Bug #1174 Updated: SigSegv in ODBC handling

From: Date: Mon, 22 Feb 1999 13:17:51 +0000
Subject: Bug #1174 Updated: SigSegv in ODBC handling
Groups: php.dev 
Request: Send a blank email to php-dev+get-4247@lists.php.net to get a copy of this message
ID: 1174 User Update by: gody@master.slon.net Status: Open Bug Type: ODBC related Description: SigSegv in ODBC handling 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. Full Bug description available at: http://ca.php.net/bugs.php3?id=1174 -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4247) next »