Git Product home page Git Product logo

Comments (4)

segevfiner avatar segevfiner commented on September 6, 2024

Yep. Right here: https://github.com/andfoy/winpty-rs/blob/3b08c65244630fb5c1b7772b0295f317e92e98b9/src/pty/base.rs#L444-L454

encode_wide does not add a null terminator, but you are calling WideCharToMultiByte with -1 which tells it to treat it as a null terminated string. Undefined Behavior! as the Rust books like to proclaim. 😝

EDIT: But you did manually add a null terminator, so that's not the issue... time to keep digging...

EDIT 2: So actually caused by writing the nul byte through to the PTY. I will send a PR.

@andfoy

from pywinpty.

segevfiner avatar segevfiner commented on September 6, 2024

The fix was merged. Thanks @andfoy. But winpty-rs and this module still need to be released for the fix to be picked up. (Just an FYI in case anyone hits this).

P.S. This module seems to have not committed the Cargo.lock which means it will build with whatever happens to be the latest matching versions of winpty-rs and other libraries. I think this is a case where you should commit the Cargo.lock for reproducible builds (As this is a cdylib case), just remember to update it when needed.

from pywinpty.

ccordoba12 avatar ccordoba12 commented on September 6, 2024

@andfoy is the maintainer of this project as well (as you can see in the commit history).

from pywinpty.

segevfiner avatar segevfiner commented on September 6, 2024

@andfoy is the maintainer of this project as well (as you can see in the commit history).

Yeah. I know. It's up to him when to make a new release of this.

from pywinpty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.