Skip to content

cURL error 23 when writing output to the terminal on Windows #12131

@lordmulder

Description

@lordmulder

I did this

On some Windows version (tested with WinXP SP-2), cURL fails with the following error, if writing output to the terminal:

curl: (23) Failure writing output to destination

(output to a file still works)

I have been able to track this error down to the tool_write_cb() function 😤

Specifically, the invocation of WriteConsoleW() fails, with Win32 error code ERROR_INVALID_ACCESS.

Setting parameter lpNumberOfCharsWritten to a valid pointer fixed the problem for me.

Please see: #12130

This seems to be a regression from: af3f4e4

I expected the following

cURL should be able to write to the terminal.

curl/libcurl version

cURL 8.4.0

operating system

Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions