php.net |  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
 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

--Jani

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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 15:01:29 2024 UTC