php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7037 patch for main/rfc1867.c (OpenBSD & SuSE)
Submitted: 2000-10-05 05:27 UTC Modified: 2000-12-23 14:24 UTC
From: swenson at heronetwork dot com Assigned:
Status: Closed Package: Installation problem
PHP Version: 4.0 Latest CVS (05/10/2000) OS: OpenBSD & SuSE
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: swenson at heronetwork dot com
New email:
PHP Version: OS:

 

 [2000-10-05 05:27 UTC] swenson at heronetwork dot com
Just got latest CVS tarball installed on my two servers. I do not know if you have this patch from the OpenBSD group or not. I can not find a related bug. So I am letting you know that it was needed.

--- main/rfc1867.c:1.38 Sat Aug  5 23:40:28 2000
+++ main/rfc1867.c      Sun Sep  3 22:09:46 2000
@@ -112,7 +112,7 @@
        int eolsize;
        long bytes, max_file_size = 0;
        char *namebuf=NULL, *filenamebuf=NULL, *lbuf=NULL,
-                *abuf=NULL, *start_arr=NULL, *end_arr=NULL, *arr_index=NULL;
+                *abuf=NULL, *start_arr=NULL, *end_arr=NULL, *arr_index=NULL, *sbuf=NULL;
        FILE *fp;
        int itype, is_arr_upload=0, arr_len=0;
        zval *http_post_files=NULL;
@@ -223,8 +223,10 @@
                                                }
                                                abuf = estrndup(namebuf, strlen(namebuf)-arr_len);
                                                sprintf(lbuf, "%s_name[%s]", abuf, arr_index);
+                                               sbuf = estrdup(abuf);
                                        } else {
                                                sprintf(lbuf, "%s_name", namebuf);
+                                               sbuf = estrdup(abuf);
                                        }
                                        s = strrchr(filenamebuf, '\\');
                                        if (s && s > filenamebuf) {
@@ -418,6 +418,7 @@
                                break;
                }
        }
+       if(sbuf) efree(sbuf);
        SAFE_RETURN;
 }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-30 11:05 UTC] stas@php.net
I don't see a purpose of this patch. Could you please explain?
 [2000-10-30 13:04 UTC] swenson at heronetwork dot com
It came from the OpenBSD patch tree for php4 requirements to run under OpenBSD.

When I I walked through it myself for the current distribution I couldn't see the reason for it myself. But, I couldn't find the reason for it myself. I am not that experienced with doing ports for OpenBSD. So I assumed it is some kind of hook for OpenBSD. It doesn't look like it is doing any harm.

I have been told that one or more of the PHP developer gurus are on the OpenBSD lists. Since the OpenBSD patch tree has it. I figured you'd want to know about it.

Wish I could be of more help on this one.
 [2000-12-07 11:48 UTC] sniper@php.net
Is this patch still needed with latest CVS ?
 [2000-12-23 14:24 UTC] jon@php.net
According to Anil Madhavapeddy <avsm@openbsd.org>, this patch is definately no longer needed.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 20:00:02 2026 UTC