Browse Source

dev.c, add model size for XSPICE models, preventing heap corruption.

Ocurred with dll under Windows 10 only.
Detected with crtdbg.h, and _CrtSetDbgFlag(_CrtSetDbgFlag(0) || _CRTDBG_CHECK_ALWAYS_DF)
in ngSpiceInit() and {char *test = TMALLOC(char, 1);} as test vehicle.
pre-master-46
Holger Vogt 7 years ago
parent
commit
f021424041
  1. 2
      src/spicelib/devices/dev.c

2
src/spicelib/devices/dev.c

@ -374,8 +374,8 @@ int add_device(int n, SPICEdev **devs, int flag){
#endif
DEVices[DEVNUM+i] = devs[i];
/* added by SDB on 6.20.2003 */
DEVices[DEVNUM+i]->DEVinstSize = &MIFiSize;
DEVices[DEVNUM+i]->DEVmodSize = &MIFmSize;
DEVicesfl[DEVNUM+i] = flag;
}

Loading…
Cancel
Save