Comments (3)
Hi @0xceed, I've checked the code and your screenshot, and found that the static analysis tool is wrong.
The static analysis tool assumes that total_space
could be < ds->append_data_size
. However, it is impossible. When ds->append_data_size > 500
, we not only set ds->append_data
to NULL
, but also set ds->append_data_size
to 0
. Therefore, total_space
should always be >= ds->append_data_size
.
if (ds->append_data_size > 500) {
xfree(ds->append_data);
ds->append_data = NULL;
ds->append_data_size = 0;
}
You may need to use some mechanism to skip this logic error in the static analysis tool. Thanks.
from argtable3.
Also, lib version is 3.2.1
from argtable3.
Thank you a bunch, sure thing, I haven't checked it's correctness; just wondered if this real bug.
from argtable3.
Related Issues (20)
- https issues on https://argtable.org/ - https://www.argtable.org/ fine HOT 1
- Add doc/examples to explain how to implement sub-commands
- Enhance CMake scripts to take advantage of vcpkg's manifest mechanism HOT 2
- clang vs gcc attributes HOT 3
- Use CodeQL to scan security vulnerabilities
- Table entries with empty glossary strings may displayed. HOT 2
- What is the recommended way to get all the args that have not been matched HOT 2
- index out of bound HOT 1
- arg_print_formatted_ds does not reset column count when reaching newline HOT 2
- Minus symbol stripped from negative numbers HOT 2
- Missing include install path in CMake config export HOT 2
- CMake not including header on static build HOT 1
- `-Wpedantic` should be used conditonally on GCC version HOT 7
- Add project to meson WrapDB HOT 6
- Expose arg_basename function as part of the API HOT 2
- Documentation requeset HOT 1
- Multi-command example has compiler warnings caused by missing the "const" qualifier
- A question mark can't be used as a short option. HOT 1
- Erroneous substring matching of long options. 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 argtable3.