|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10458 Bugs #9257 and #10292 located and fixed - see diff
Submitted: 2001-04-23 10:58 UTC Modified: 2001-05-03 03:30 UTC
From: lawe at tdk dot dk Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.4pl1 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lawe at tdk dot dk
New email:
PHP Version: OS:


 [2001-04-23 10:58 UTC] lawe at tdk dot dk

See additional comments under #10292.

I have located and corrected the two bugs. Here is the diff between the new ./ext/interbase.c and the old one (version 1.48):

$diff interbase.c interbase.orig.c
<           val->value.str.val[len] = 0;
<               val->value.str.val = php_addslashes(val->value.str.val, len, &len, 1);
>               val->value.str.val = php_addslashes(val->value.str.val, len, &len, 0);
<           val->value.str.len = sprintf(string_data, "%Ld.%0*Ld",
<                                        (ISC_INT64) (*((ISC_INT64 *)data) / (int) pow(10.0, (double) -scale)), -scale,
>           val->value.str.len = sprintf(string_data, "%Ld.%Ld",
>                                        (ISC_INT64) (*((ISC_INT64 *)data) / (int) pow(10.0, (double) -scale)),

It would be very convenient, if a modified php_interbase.dll could be made available soon. The Linux and FreeBSD users can just make the corrections and compile again.

Ad #9257) The old code didn't cope with the scale parameter to adjust the width of the fractional part (zero-padded).

Yours sincerely,
Lars Westermann


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-03 03:30 UTC]
Andi applied your patch.


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 09:01:29 2024 UTC