Saltar al contenido
← volver

Steinar H. Gunderson: Decompilation patterns, part 14: Strength increase

Planet Debian · blog.sesse.net Publicado:

Let's look at the entire loop from yesterday: u16 spE10; u16 *var_v0_2; ... var_t1_2 = 0x7F; var_v0_2 = &spE10 + 0xFE; do { *var_v0_2 = 0; var_t1_2 -= 1; var_v0_2 -= 2; } while (var_t1_2 >= 0); What's going with the pointer arithmetic here? Why is it indexing out-of-bounds? The first thing to notice is that m2c doesn't really take into account that arithmetic on pointers in C is multiplied by the size of the element. And obviously, spE10 is the root of some array. So corrected, this reads: u16…

Leer original →

Más de Planet Debian