cybersecurity · intermediate · ~15 min · safe pentest lab

Read a little-endian uint32

Decode an LE32 value.

Challenge

Implement unsigned read_le32(const unsigned char *b) assembling a 32-bit value from 4 little-endian bytes (b[0] is least significant).

Starter code

unsigned read_le32(const unsigned char *b) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.