You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case a NULL pointer is passed for parameter opts of type ccnl_interest_opts_u in function ccnl_mkInterest a default value is assigned. Unfortunately, the default value is local and thus resides on the stack. Hence, the value of opts is garbage after exiting the function, i.e.
theoretically yes, but once the function ccnl_mkInterest() returns, the opts value is never used again. It's only used for marshalling the packet in ccnl_ndntlv_prependInterest. No references are saved for later use.
theoretically yes, but once the function ccnl_mkInterest() returns, the opts value is never used again. It's only used for marshalling the packet in ccnl_ndntlv_prependInterest. No references are saved for later use.
Thanks for the heads up. Honestly, I don't really like it. I've stumbled a couple times in false positives of the static analyzer where e.g. a parameter was used in a subsequent call, etc.
We probably should check how we can silence these false positives or think about if we should clarify/fix these "issues". We also should probably add a new label which allows for easy filtering of these things (check if an issue identified by the static analyzer has been discussed before).
Description
In case a
NULL
pointer is passed for parameteropts
of typeccnl_interest_opts_u
in functionccnl_mkInterest
a default value is assigned. Unfortunately, the default value is local and thus resides on the stack. Hence, the value ofopts
is garbage after exiting the function, i.e.Or am I missing something?
The text was updated successfully, but these errors were encountered: