Giter Club home page Giter Club logo

Comments (3)

nanomad avatar nanomad commented on May 18, 2024

FYI I can work on a pull request if you agree with my proposed solution

from capstone.

aquynh avatar aquynh commented on May 18, 2024

On Wed, May 7, 2014 at 7:16 PM, Giovanni Condello
[email protected]:

Whenever an instruction is marked as SKIPDATA, capstone should not try to
access insn->detail as it will be null thus causing segmentations fauls
(see, for example, cs_insn_group).

I think the correct way to handle this is to

  • Set handle->errnum to CS_ERR_SKIPDATA if insn is actually skipped
    due to CS_OPT_SKIPDATA

currently we set insn.id = 0 to reflect that the instruction is
irrelevant, so why do we still need to set errnum?

  • Always check for insn->detail to be not null before accessing it

this is what we already did in all tests/test*.c code: checking
insn->detail before dereferencing it.
i believe this is also documented in capstone.h

  • (Maybe throwing something more different from CS_ERR_DETAIL to
    identify the two cases)

by "throwing something", are you talking about the bindings (Java, Python?)

let me know if i still miss something.

anyway, Pull Request is always welcome, as it is a best way to demonstrate
what you are saying :-)

thanks.
Q

from capstone.

nanomad avatar nanomad commented on May 18, 2024

Closing this one, let's continue on #107

from capstone.

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.