diff
<     // Assuming there is a loop here that should set 'frag'
<     while (some_condition) {
<         // Some loop code that should initialize 'frag'
<     }
<     if (frag->offset > len) {
---
>     while (some_condition) {
>         Frag *frag = get_next_fragment(); // Correctly initialize 'frag' within the loop
>         if (frag->offset > len) {
>             // Rest of the loop code
>         }
>     }
