[ros-bugs] [Bug 2795] Python miss first 120 bytes from script.
ReactOS.Bugzilla at www.reactos.org
ReactOS.Bugzilla at www.reactos.org
Wed Nov 7 11:15:06 CET 2007
http://www.reactos.org/bugzilla/show_bug.cgi?id=2795
--- Comment #2 from jeanmichel.123 <jeanmichel.123 at free.Fr> 2007-11-07 11:15:06 CET ---
Created an attachment (id=2068)
--> (http://www.reactos.org/bugzilla/attachment.cgi?id=2068)
flockfile and Py_UniversalNewlineFgets function is in attached file
According to previous attachment, it looks like first byte is read and unread.
It looks like the check BOM code, and looks like decoding_fgets call check_bom
function.
Then, the Py_UniversalNewlineFgets should be called with fobj=NULL.
This code contains c = 'x'; 'x' looks like the 120 bytes offset (ASCII code).
It looks like ReactOS does not execute flockfile, but some function which move
current file offset, with the 120 value which might yet be in the stack.
Py_UniversalNewlineFgets(char *buf, int n, FILE *stream, PyObject *fobj)
{
char *p = buf;
int c;
int newlinetypes = 0;
int skipnextlf = 0;
int univ_newline = 1;
if (fobj) { ... }
FLOCKFILE(stream);
c = 'x'; /* Shut up gcc warning */
while (--n > 0 && (c = GETC(stream)) != EOF ) {
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Ros-bugs
mailing list