php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14074 segfault strncpy on ct_connect
Submitted: 2001-11-15 16:18 UTC Modified: 2001-11-20 19:07 UTC
From: ceo at l-i-e dot com Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0.6 OS: Mandrake 8.0
Private report: No CVE-ID: None
 [2001-11-15 16:18 UTC] ceo at l-i-e dot com
(gdb) bt
#0  0x401220f6 in strncpy () from /lib/libc.so.6
#1  0x404856bd in ct_connect (con=0x80f2588, 
servername=0x80f758c "lynchux", snamelen=-9) at ct.c:294
#2  0x4033f728 in php_sybase_do_connect_internal 
(sybase=0x80f718c, host=0x80f758c "lynchux",
    user=0x80f7114 "sa", passwd=0x0) at php_sybase_ct.c:414
#3  0x403400c5 in php_sybase_do_connect (ht=2, 
return_value=0x80f714c, this_ptr=0x0, return_value_used=1,
    persistent=0) at php_sybase_ct.c:618
#4  0x4034029c in php_if_sybase_connect (ht=2, 
return_value=0x80f714c, this_ptr=0x0, return_value_used=1)
    at php_sybase_ct.c:660
#5  0x40289a0d in execute (op_array=0x80f251c) at 
./zend_execute.c:1504
#6  0x4028be12 in execute (op_array=0x80ed54c) at 
./zend_execute.c:2049
#7  0x4029ab7d in zend_execute_scripts (type=8, 
file_count=3) at zend.c:752
#8  0x402b29ec in php_execute_script 
(primary_file=0xbffff5b0) at main.c:1206
#9  0x402ae085 in apache_php_module_main (r=0x80e31dc, 
display_source_mode=0) at sapi_apache.c:89
#10 0x402aed9c in send_php (r=0x80e31dc, 
display_source_mode=0,
    filename=0x80e3d64 
"/home/www/virtualitguy/admin/sql.htm") at mod_php4.c:536
#11 0x402aedd5 in send_parsed_php (r=0x80e31dc) at 
mod_php4.c:547
#12 0x080541a7 in ap_invoke_handler ()
#13 0x0806914b in process_request_internal ()
#14 0x080691c0 in ap_process_request ()
#15 0x08060222 in child_main ()
#16 0x080603d4 in make_child ()
#17 0x08060548 in startup_children ()
#18 0x08060bf0 in standalone_main ()
#19 0x0806145f in main ()
#20 0x400ba0de in __libc_start_main () from /lib/libc.so.6
(gdb)

./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-sybase-ct=/opt/sybase \
--with-mssql=/opt/sybase \
--without-mysql \
--without-pgsql \
--enable-debug \
--disable-debugger \
--enable-pic \
--prefix=/usr \
--with-zlib \
--with-config-file-path=/etc \
--enable-magic-quotes \
--enable-track-vars \
--with-versioning \
--enable-sysvsem \
--enable-sysvshm \
--enable-ftp \
--with-xml \
--with-gettext \
--with-jpeg-dir=/usr/src/jpeg-6b \
--with-png-dir=/usr/src/libpng-1.2.0 \
--with-gd \
--with-freetype-dir=/usr/src/freetype \
--without-ldap \
--without-imap \
--without-readline

Current Sybase ASE installed.

isql can connect and works fine.

[Thu Nov 15 15:13:42 2001] [notice] Apache/1.3.22 (Unix) 
PHP/4.0.6 configured -- resuming normal operations
[Thu Nov 15 15:13:42 2001] [notice] Accept mutex: sysvsem 
(Default: sysvsem)
[Thu Nov 15 15:13:46 2001] [notice] child pid 20866 exit 
signal Segmentation fault (11)
[root@windows11 include]#

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-20 19:07 UTC] ceo at l-i-e dot com
Never mind.

This is what happens when ldconfig has found the FreeTDS 
library, but you compiled PHP with the Sybase headers...

Sorry.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 21:01:29 2024 UTC