Commit Graph

13 Commits

Author SHA1 Message Date
Cary R d79e49a372 Fix compile warning 2025-10-12 17:37:50 -07:00
Cary R 99580cd051 Fix warnings that toupper() takes an int 2025-02-17 09:37:18 -08:00
Jevin Sweval e80746c50f Fix sscanf overflows
Without this fix, ivlh_textio was failing at step 11 where the time is read from the file. This was because clang happens to put period directly after the units buffer on the stack. sscanf writes the terminating NUL overwriting the low byte of period, which is 100, so it returns 0.

Example clang warning fixed:

warning: 'sscanf' may overflow; destination buffer in argument 4 has size 2, but the corresponding specifier may require size 3 [-Wfortify-source]
2022-07-04 14:34:14 -07:00
Cary R 956f6ccf4c Update VPI routines to on error signal VVP to return non-zero 2021-01-20 23:50:53 -08:00
Martin Whitaker a9f1f306f1 Replace strndup with strdup and fix a few potential buffer overrun bugs.
strndup is not available in Windows.
2016-10-14 22:19:33 +01:00
Martin Whitaker edb922f613 Use correct format strings for PLI_UINT64 in printf/scanf functions. 2016-10-14 20:35:36 +01:00
Maciej Suminski 770906ba0d vhdlpp: Write binary constants as a string of bits. 2016-03-07 17:11:53 +01:00
Maciej Suminski 41a45a8db0 vhdlpp: Avoid unnecessary toupper() call. 2016-03-07 17:11:53 +01:00
Maciej Suminski 7c10de918e vhdlpp: read() takes into account the size of the destination variable. 2016-03-07 17:11:53 +01:00
Maciej Suminski 1ed4603a18 vhdlpp: Set EOF flag right after reaching the end of file. 2016-03-07 09:54:28 +01:00
Maciej Suminski 34b5834a84 vhdlpp: Added file_open() variant that returns status. 2016-03-07 09:54:28 +01:00
Cary R 45fc06cf11 A format is a vpiStringVal not vpiStringVar, fix memory leak 2015-12-13 18:57:09 -08:00
Maciej Suminski b414733f34 vhdlpp: std.textio & ieee.std_logic_textio functions implemented using VPI. 2015-11-24 17:16:51 +01:00