File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -114,13 +114,15 @@ impl EventGroup {
114114 /// Deserializes an event group from bytes
115115 pub fn from_bytes ( bytes : & [ u8 ] ) -> Result < Self , Box < dyn std:: error:: Error > > {
116116 let header = bytes. as_ptr ( ) as * mut audit_event_header_st ;
117- let context = unsafe { format_context ( ( * header) . pid_tgid , ( * header) . context ) } ;
118- let ktime = unsafe { Duration :: from_nanos ( ( * header) . ktime ) } ;
117+ let context =
118+ unsafe { format_context ( ( * header) . pid_tgid . into ( ) , ( * header) . context . into ( ) ) } ;
119+ let ktime = unsafe { Duration :: from_nanos ( ( * header) . ktime . into ( ) ) } ;
119120 let event = match unsafe { ( * header) . type_ } {
120121 audit_event_type_t:: AUDIT_EVENT_NEW_CONTEXT => {
121122 let raw_new_context = bytes. as_ptr ( ) as * mut audit_new_context_event_st ;
122- let parent =
123- unsafe { format_context ( ( * header) . pid_tgid , ( * raw_new_context) . parent ) } ;
123+ let parent = unsafe {
124+ format_context ( ( * header) . pid_tgid . into ( ) , ( * raw_new_context) . parent . into ( ) )
125+ } ;
124126 let origin = unsafe {
125127 ( & ( * raw_new_context) . origin ) [ ..( * raw_new_context) . origin_size as usize ] . to_vec ( )
126128 } ;
@@ -143,7 +145,7 @@ impl EventGroup {
143145 end : ktime,
144146 events : vec ! [ Event :: Data {
145147 key: key. to_str( ) ?. to_string( ) ,
146- value: EventData :: Word ( ( * raw_word_data) . value) ,
148+ value: EventData :: Word ( ( * raw_word_data) . value. into ( ) ) ,
147149 } ] ,
148150 }
149151 }
You can’t perform that action at this time.
0 commit comments