File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace initramfs
1414{
1515 namespace ustar
1616 {
17- // constexpr std::string_view magic { "ustar", 6 };
17+ constexpr std::string_view magic { " ustar" , 6 };
1818 // constexpr std::string_view version { "00", 2 };
1919
2020 enum types : char
@@ -65,8 +65,8 @@ namespace initramfs
6565 lib::info (" ustar: extracting initramfs" );
6666
6767 auto current = reinterpret_cast <header *>(data.data ());
68- // while (magic == std::string_view { current->magic, 6 })
69- while ( current < reinterpret_cast <header *>(data.data () + data.size ()))
68+ while (magic == std::string_view { current->magic , 6 } &&
69+ current < reinterpret_cast <header *>(data.data () + data.size ()))
7070 {
7171 if (current->name [0 ] == ' \0 ' )
7272 break ;
You can’t perform that action at this time.
0 commit comments