3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Merge branch 'YosysHQ:main' into main

This commit is contained in:
Akash Levy 2025-02-26 09:51:44 -08:00 committed by GitHub
commit 9d3b7f7474
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 1019 additions and 10 deletions

View file

@ -0,0 +1,10 @@
--- fstapi.cc
+++ fstapi.cc
@@ -6072,6 +6072,7 @@ for(;;)
}
wx_len = snprintf(wx_buf, 32, "r%.16g", d);
+ if (wx_len > 32 || wx_len < 0) wx_len = 32;
fstWritex(xc, wx_buf, wx_len);
}
}

View file

@ -18,3 +18,4 @@ sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h
patch -p0 < 00_PATCH_win_zlib.patch
patch -p0 < 00_PATCH_win_io.patch
patch -p1 < 00_PATCH_strict_alignment.patch
patch -p0 < 00_PATCH_wx_len_overread.patch

View file

@ -3907,16 +3907,18 @@ while (value)
static int fstVcdIDForFwrite(char *buf, unsigned int value)
{
char *pnt = buf;
int len = 0;
/* zero is illegal for a value...it is assumed they start at one */
while (value)
while (value && len < 14)
{
value--;
++len;
*(pnt++) = (char)('!' + value % 94);
value = value / 94;
}
return(pnt - buf);
return len;
}
@ -6070,6 +6072,7 @@ for(;;)
}
wx_len = snprintf(wx_buf, 32, "r%.16g", d);
if (wx_len > 32 || wx_len < 0) wx_len = 32;
fstWritex(xc, wx_buf, wx_len);
}
}