Fix heap overflows in CDG decoder