-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
At src/support/mod.rs
impl<T> SyncRawPtr<T>{
...
pub fn offset(&mut self,value:isize){
unsafe{
self.ptr=self.ptr.offset(value);
}
}
....
impl<T> SyncRawMutPtr<T>{
...
pub fn offset(&mut self,value:isize){
unsafe{
self.ptr=self.ptr.offset(value);
}
}Both struct and their methods offset are publicly accessible, but lack of sufficient checks for parameter value, which might cause memory risks under complete safe API. In rust, we are not expecting memory issues by merely using safe API.
Suggestion:
- Make sure such issues not exist in the latest version
- If does, it is good to mark them with unsafe or having enough checks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels