Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use an IPA type for flow states#473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lcartey merged 1 commit intogithub:mainfromjketema:flowstate-fix
Dec 12, 2023
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,28 +42,24 @@ class ReallocationFunction extends AllocationFunction {
ReallocationFunction() { exists(this.getReallocPtrArg()) }
}

/**
* A data-flow state for a pointer which has not been reallocated.
*/
class IndirectCastDefaultFlowState extends DataFlow::FlowState {
IndirectCastDefaultFlowState() { this = "IndirectCastDefaultFlowState" }
}

/**
* A data-flow state for a pointer which has been reallocated but
* has not yet been zeroed with a memset call.
*/
class IndirectCastReallocatedFlowState extends DataFlow::FlowState {
IndirectCastReallocatedFlowState() { this = "IndirectCastReallocatedFlowState" }
}
newtype IndirectCastFlowState =
/**
* A data-flow state for a pointer which has not been reallocated.
*/
IndirectCastDefaultFlowState() or
/**
* A data-flow state for a pointer which has been reallocated but
* has not yet been zeroed with a memset call.
*/
IndirectCastReallocatedFlowState()

/**
* A data-flow configuration to track the flow from cast expressions to either
* other cast expressions or to dereferences of pointers reallocated with a call
* to `realloc` but not cleared via a function call to `memset`.
*/
module IndirectCastConfig implements DataFlow::StateConfigSig {
class FlowState =DataFlow::FlowState;
class FlowState =IndirectCastFlowState;

predicate isSource(DataFlow::Node source, FlowState state) {
state instanceof IndirectCastDefaultFlowState and
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp