|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11178 possible off-by-one error in fgetcsv
Submitted: 2001-05-29 19:27 UTC Modified: 2001-06-18 20:30 UTC
From: wolfram dot schmidt at e-prolde Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.5 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: wolfram dot schmidt at e-prolde
New email:
PHP Version: OS:


 [2001-05-29 19:27 UTC] wolfram dot schmidt at e-prolde
ext/standard/file.c line 1890-1917 in function fgetcsv

        /* add single space - makes it easier to parse trailing null field */
        *tptr++ = ' ';
        *tptr = 0;

I think if FP_FGETS returns exactly len bytes and there are no traling whitespaces the 0 will be written behind the buf's end.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-30 05:38 UTC]
Do you have any test case that shows this possible error?
Since it works just fine for me..


 [2001-06-18 20:30 UTC]
No feedback. Should be fixed. (can't reproduce)

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 19:05:50 2023 UTC