Git Product home page Git Product logo

Comments (6)

nemequ avatar nemequ commented on April 28, 2024

FWIW I would be willing to add someone to Squash's project on Coverity Scan so you can see the results in their interface, though I would suggest just creating a project for brotli. It has actually uncovered quite a few real issues in other compression libraries (as well as Squash itself) with surprisingly few false positives—definitely worth it, IMHO.

from brotli.

eustas avatar eustas commented on April 28, 2024

All Coverity Scan reports have been addressed =)

See https://scan.coverity.com/projects/google-brotli

Thank you for reporting about these issues.

from brotli.

nemequ avatar nemequ commented on April 28, 2024

I think it's time for another run; Coverity is reporting 9 high-impact issues and 4 medium-impact issues in Brotli.

from brotli.

eustas avatar eustas commented on April 28, 2024

Uninitialized variables and null-dereference are all false-positives. Usage of tainted values is natural -> almost false positive. Going to toss coda a little bit to convince Coverity Scan.

from brotli.

nemequ avatar nemequ commented on April 28, 2024

FWIW, cppcheck picks up a couple minor issues, too:

[brotli/enc/block_splitter_inc.h:280] -> [brotli/enc/block_splitter_inc.h:281]: (style) Variable 'pairs' is reassigned a value before the old one has been used.
[brotli/enc/write_bits.h:80]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'.

To fix the second one, you could cast to int, or if you want to really use size_t you can do something like this (stolen from https://github.com/nemequ/munit/blob/master/munit.h#L56):

#if !defined(_WIN32)
  #define BROTLI_SIZE_SPECIFIER "zu"
#elif defined(_M_X64) || defined(__amd64__)
  #define BROTLI_SIZE_SPECIFIER "I64u"
#else
  #define BROTLI_SIZE_SPECIFIER "u"
#endif

Windows make everything harder.

from brotli.

nemequ avatar nemequ commented on April 28, 2024

@eustas, I see the only issue remaining is a null-pointer dereference; IIRC that can be "fixed" by adding an assert(foo != NULL). If it's a function parameter, another possibility might be to add a nonnnull attribute… Looks like it's available in GCC 3.3+.

from brotli.

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.