Giter Site home page Giter Site logo

fixes for null pointer de-references about discount HOT 3 CLOSED

orc avatar orc commented on September 26, 2024
fixes for null pointer de-references

from discount.

Comments (3)

Orc avatar Orc commented on September 26, 2024

It looks like you reformatted a large chunk of the code around your changes; can you give me a diff that just has the changes, and not the whitespace/indentation changes?

from discount.

reklis avatar reklis commented on September 26, 2024

git diff -w:

https://gist.github.com/2002442

from discount.

Orc avatar Orc commented on September 26, 2024

That's much better.

But the static analyzer is picking up false positives;

in linkyformat(), ref is always carried in as a non-null item (there is one place where it's called with a null and then treated as an image, but that place is, as best as I can tell, never accessed, and when I took it out it made no difference to my test suite.)

in quoteblock(), p->text is known to be non-null when the function is called (it would not have been called unless p->text contained a leading ">") so it does not need to be retested.

in actually_a_table(), the second thing the code does is verify that pp, pp->next, and pp->next->next exist; pp->next will not then go away while I'm validating the format of the table.

from discount.

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.