php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2445 calling pgsql_fetch_array with 3 args causes segfault
Submitted: 1999-10-05 13:43 UTC Modified: 1999-10-05 13:47 UTC
From: brian at soda dot berkeley dot edu Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Beta 2 OS: FreeBSD 4-CURRENT
Private report: No CVE-ID: None
 [1999-10-05 13:43 UTC] brian at soda dot berkeley dot edu
Apply the following patch to fix the bug:

--- php-4.0b2/ext/pgsql/pgsql.c.old     Mon Aug  2 12:16:49 1999
+++ php-4.0b2/ext/pgsql/pgsql.c Tue Oct  5 10:33:26 1999
@@ -883,7 +883,7 @@
                        }
                        break;
                case 3:
-                       if (getParameters(ht, 2, &result, &row, &arg3)==FAILURE) {
+                       if (getParameters(ht, 3, &result, &row, &arg3)==FAILURE) {
                                RETURN_FALSE;
                        }
                        convert_to_long(arg3);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-05 13:47 UTC] sas at cvs dot php dot net
Thanks, I've applied your patch.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 18 13:00:01 2026 UTC