Giter Site home page Giter Site logo

Comments (6)

erikd avatar erikd commented on July 28, 2024

Does this happen without -pedantic? That flag is not very useful because it usually means pedantic with regards to a very old C spec. Its better to use (when you are using GCC) things like -std=c99 to specify a particular standard.

from ogg.

willson-chen avatar willson-chen commented on July 28, 2024

I got no warning no matter add -Wall -pedantic or not. My gcc version is 7.4.

from ogg.

rillian avatar rillian commented on July 28, 2024

I cannot reproduce the warning either. The guards against LONG_MAX were added in 1.3.1 to protect against overflow on systems like win64 where long is 32 bits, but pointers are 64 bits. There a > 1GB packet could fit in memory, but the storage bound could overflow.

On systems with a 64-bit long it's impossible to allocate enough data to overflow the length, even assuming you had time to submit that many ogg pages. However, technically the guard should be against LONG_MAX divided by sizeof(*os->lacing_vals) and it's worth fixing for the sake of 32-bit platforms.

from ogg.

willson-chen avatar willson-chen commented on July 28, 2024

@krcroft , could you offer more informations about how to reproduce the warning? such as your build platform, os name and so on. I had trid some times in Ubuntu 18.04 and some other Linux distributions, but got no warning.

from ogg.

kcgen avatar kcgen commented on July 28, 2024

Sorry for the delayed reply; I should have included more detail about architecture. At the time I was compiling for OSX and Windows targets using msys2 and mingw. I will check again with using ogg 1.3.1.

from ogg.

kcgen avatar kcgen commented on July 28, 2024

I can't reproduce this today using the current code and stable compiler revisions (tested 9.1, 8.2, and 7.4). Closing!

from ogg.

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.