Comments (3)
I'm not 100% sure yet, but I think the problem is this line:
rcutils/src/error_handling_helpers.h
Line 159 in befc608
The arguments to rcutils_copy_string
are the destination pointer, the destination size, and the source pointer. In this case, the destination size is bytes_left
, which is set to sizeof(error_string->str)
in the previous line. However, there is no guarantee that the source has that many bytes to give. Now, I agree with you that this kind of defeats the purpose of the strnlen
, so this is probably a false positive. Nevertheless, we can probably be defensive there and use the smaller of sizeof(error_string->str)
and sizeof(error_state->message)
as the bytes_left
. I think that will get rid of the warning.
Do you want to try that out, or would you like me to poke at it more (I'm happy to do either)?
from rcutils.
I can try it out! I'll open a draft PR and check.
from rcutils.
Closed with #353
Reference newer case without the warning:
https://ci.ros2.org/view/packaging/job/packaging_linux/2572/
from rcutils.
Related Issues (20)
- Calculate the size of the specified directory (include subdirectory) HOT 13
- MSBuild warnings C5105: macro expansion producing 'defined' has undefined behavior HOT 2
- 👩🌾 test_logging_long_messages failing on Dashing HOT 1
- Arch Linux: Compilation error with rcutils in ros2 HOT 5
- cmake warning on OSX: No known linker flag to force library linkage HOT 1
- Warnings while compiling to WebAssembly HOT 2
- error: rcutils/logging_macros.h: No such file or directory HOT 1
- logging_macros.h not found HOT 1
- Why does `rcutils_expand_user` fail on non-existent directory? HOT 2
- High logging overhead HOT 5
- AddressSanitizer: new-delete-type-mismatch in rcutils_string_map_fini HOT 3
- Human Readable time in logs HOT 12
- "Failed to find exported target names" error while colcon build HOT 3
- Undefined symbol: rcutils_log_internal HOT 2
- Make logging functionality truly thread-safe HOT 3
- performance_test_fixture not found HOT 4
- Valgrind shows leak in rcutils_load_shared_library HOT 1
- Superfluous `va_copy` call in `rcutils_char_array_vsprintf` HOT 2
- Test failure on nightly_linux_address_sanitizer
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 rcutils.