Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47439 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88364 invoked from network); 20 Mar 2010 01:07:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2010 01:07:01 -0000 Authentication-Results: pb1.pair.com header.from=ssufficool@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ssufficool@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ssufficool@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:32778] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/D4-59870-3BF14AB4 for ; Fri, 19 Mar 2010 20:07:00 -0500 Received: by vws8 with SMTP id 8so1531vws.29 for ; Fri, 19 Mar 2010 18:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=O9xSiWd65UdAr3UPWT/xMCNDkxGOi1Wsc+OY3Nui6yg=; b=G00uY72C77MPFzd2vqY9kiZNKnmGz3mj1itluFt7tKsRtoHbISmDLZtirYgmmvpuvR cPj2t5xmb4aQ1NYda1Y0XLVtWkTYGc0iB4uh9NsD7tY2uSkU0nFjwn8o1b6hGJqhpa1u c0hQaIUiwGrTv4186YVec4TNGNk3W3GHkFns4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=l4aHr8uS5YDb01ulZHcYcL6JJQIrjSPRYz7z7ctqbMTg+PRC7Fa/snvTh4tI08AqPG +0XYTQx6XvKGBUJQR7GRVCnCrYGBFWDr9o95lUqs2RqQfrq2CaJnmkvYiRKJNhckLRVN YuNA+b8cXoXPkCPr83TMbyVy8NK6OESpQZ5ZY= MIME-Version: 1.0 Received: by 10.220.128.78 with SMTP id j14mr2070913vcs.176.1269047216649; Fri, 19 Mar 2010 18:06:56 -0700 (PDT) In-Reply-To: <4BA3A13F.8030002@beccati.com> References: <4B9E5634.1040508@oracle.com> <2A17C50C-E2E6-438F-A47B-25F5E83DE6AA@pooteeweet.org> <4BA3A13F.8030002@beccati.com> Date: Fri, 19 Mar 2010 18:06:56 -0700 Message-ID: To: Matteo Beccati Cc: Lukas Kahwe Smith , Christopher Jones , PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Bug # 50755 From: ssufficool@gmail.com (Stanley Sufficool) On Fri, Mar 19, 2010 at 9:07 AM, Matteo Beccati wrote: > > So, I tried to make some time and looked at the patch for 5.3. I have to = say > that I haven't tested it nor I'm an expert by any means of the > sybase/mysql/freetds api. > > Here are my findings: > > 1. dblib_driver.c and the README were changed so that the driver will alw= ays > register as "dblib" > > Seems like a pretty big behaviour change, moreover completely unrelated t= o > the bug fix. > Reverted in new patch version. > > 2. dblib_driver.c also contains whitespace changes, comments and dbsetopt= vs > DBSETOPT > > Not sure how these are related to the bug fix. > Reverted. > > 3. lots of constants removed from php_pdo_dblib_int.h > > Can you explain why? I guess they were used for compatibility purposes. > Reverted, although these are likely for MS DBLIB which has a big-fat depreciation notice on it. These aliases really belong in the TDS lib header files, but this is for anther list. > > 4. pdo_dblib_stmt_describe > > this one looks suspicious: > > + =A0 =A0 =A0 col->name =3D (char*)dbcolname(H->link, colno+1); > + > + =A0 =A0 =A0 if (!strlen(col->name)) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 spprintf(&tmp, 0, "computed%d", colno); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 strlcpy(col->name, tmp, strlen(tmp)+1); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 efree(tmp); > > Aren't you overwriting memory that belongs to the library? > Yes I was, and that's A Bad Thing. This has been removed in the revised patch. I removed the automagic column naming as the values are addressable by numeric keys. But I would like to know if anyone relies on this behavior. > > For now I couldn't find anything else to comment about, but I've had very > little time. > > > Cheers > -- > Matteo Beccati > > Development & Consulting - http://www.beccati.com/ >