"Misc crash fixes"
https://github.com/mupen64plus/mupen64plus-core/pull/1080

Index: src/device/r4300/new_dynarec/new_dynarec.c
--- src/device/r4300/new_dynarec/new_dynarec.c.orig
+++ src/device/r4300/new_dynarec/new_dynarec.c
@@ -4274,6 +4274,7 @@ static void loop_preload(signed char pre[],signed char
 // Generate address for load/store instruction
 static void address_generation(int i,struct regstat *i_regs,signed char entry[])
 {
+  if(i>=4069) return;
   if(itype[i]==LOAD||itype[i]==LOADLR||itype[i]==STORE||itype[i]==STORELR||itype[i]==C1LS) {
     int ra=0;
     int agr=AGEN1+(i&1);
@@ -4380,6 +4381,7 @@ static void address_generation(int i,struct regstat *i
     }
   }
   // Preload constants for next instruction
+  if(i+1>=4096) return;
   if(itype[i+1]==LOAD||itype[i+1]==LOADLR||itype[i+1]==STORE||itype[i+1]==STORELR||itype[i+1]==C1LS) {
     int agr,ra;
     #if (NEW_DYNAREC!=NEW_DYNAREC_X86) && (NEW_DYNAREC!=NEW_DYNAREC_X64)
