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.
This commit is contained in:
Holger Vogt 2018-12-22 17:53:35 +01:00
parent 2c7860361d
commit f021424041
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}