Comments (6)
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.
I got no warning no matter add -Wall -pedantic
or not. My gcc version is 7.4.
from ogg.
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.
@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.
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.
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)
- MD5SUMS on releases FTP doesn't contain an entry for v1.3.3 HOT 1
- No CMakeLists inside release archive
- missing ogg_uint64_t in configuration generated by cmake HOT 10
- Tag v1.3.4 release HOT 4
- Is there a TODO list in ogg repo? HOT 1
- Clang's static code analysis flagged three warnings against the latest master branch
- ogg.def problem with mingw-w64 HOT 4
- New release? HOT 3
- CMake issue when linking ogg library into vorbis HOT 1
- CMake installs Makefiles in docs directory
- Webp support for thumbnails HOT 1
- SUM files update HOT 2
- GNU Autotools install doesn't place OggConfig.cmake in place
- build system: add meson build system
- simplifications in configure.ac (obsolecent macros)
- ogg.m4 is useless HOT 3
- simplification of code and build system: require C99 and use the [u]int*_t types HOT 5
- OggConfig.cmake.in uses wrong case for OggFound
- Gitlab down? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ogg.