summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2022-03-22 18:45:10 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2022-03-22 18:45:10 +0100
commit00b674d5b3ccefc7f2abcbf5b650fc14298ac549 (patch)
treef4fb74b1eecc2d679852fc880bd1d9b6c4f5d8df /src
parentd7ecb23eeee9c9b4924182ce570c2e33eb18abff (diff)
downloadabc-00b674d5b3ccefc7f2abcbf5b650fc14298ac549.tar.gz
abc-00b674d5b3ccefc7f2abcbf5b650fc14298ac549.tar.bz2
abc-00b674d5b3ccefc7f2abcbf5b650fc14298ac549.zip
fix buffer error
Diffstat (limited to 'src')
-rw-r--r--src/base/io/io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/base/io/io.c b/src/base/io/io.c
index 8d07702d..3874a6cf 100644
--- a/src/base/io/io.c
+++ b/src/base/io/io.c
@@ -698,13 +698,16 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
int usedX = 0;
*fOldFormat = 0;
- char Buffer[1000];
+ int MaxLine = 1000000;
+ char *Buffer;
int state = 0;
int iPo = 0;
nFrames = -1;
int status = 0;
int i;
- while ( fgets( Buffer, 1000, pFile ) != NULL )
+
+ Buffer = ABC_ALLOC( char, MaxLine );
+ while ( fgets( Buffer, MaxLine, pFile ) != NULL )
{
if ( Buffer[0] == '#' )
continue;