apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41197] New: - Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
Date Mon, 18 Dec 2006 04:39:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41197

           Summary: Mixing calls to apr_file_write and apr_file_writev on
                    buffered files causes data corruption
           Product: APR
           Version: HEAD
          Platform: Other
        OS/Version: other
            Status: NEW
          Keywords: PatchAvailable
          Severity: major
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: davi@haxent.com.br


Mixing calls to apr_file_write and apr_file_writev on buffered files causes data corruption
because the buffer is not being flushed properly when apr_file_writev is called. e.g:

    struct iovec vec;
    apr_file_write(file, "first\n", &nbytes);
    vec.iov_base = "second\n";
    vec.iov_len  = 7;
    apr_file_writev(file, &vec, 1, &nbytes);

yields a file whose contents is:

second\first\

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message