File tree Expand file tree Collapse file tree
tockloader-lib/src/attributes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,11 +112,19 @@ impl AppAttributes {
112112 // The end of the application binary marks the beginning of the
113113 // footer.
114114 //
115- // TODO(george-cosma) : This is not always true, `get_binary_end`
115+ // Note : This is not always true, `get_binary_end`
116116 // does not make sense if the application is just padding. This can
117117 // crash the process.
118118 let binary_end_offset = header. get_binary_end ( ) ;
119119
120+ match & header {
121+ TbfHeader :: TbfHeaderV2 ( _hd) => { }
122+ _ => {
123+ appaddr += total_size as u64 ;
124+ continue ;
125+ }
126+ } ;
127+
120128 let mut footers: Vec < TbfFooter > = vec ! [ ] ;
121129 let total_footers_size = total_size - binary_end_offset;
122130 let mut footer_offset = binary_end_offset;
@@ -234,6 +242,14 @@ impl AppAttributes {
234242 . map_err ( TockError :: InvalidAppTbfHeader ) ?;
235243 let binary_end_offset = header. get_binary_end ( ) ;
236244
245+ match & header {
246+ TbfHeader :: TbfHeaderV2 ( _hd) => { }
247+ _ => {
248+ appaddr += total_size as u64 ;
249+ continue ;
250+ }
251+ } ;
252+
237253 let mut footers: Vec < TbfFooter > = vec ! [ ] ;
238254 let total_footers_size = total_size - binary_end_offset;
239255 let mut footer_offset = binary_end_offset;
You can’t perform that action at this time.
0 commit comments