From: helly Date: Sun, 8 Jan 2006 23:28:03 +0000 (+0000) Subject: - Change to use istreadm::readsome() instead of unsafe buffer call X-Git-Tag: 0.13.6~504 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=046ef810d48eb02c91dd8b9c3085c7c8c97bb33d;p=re2c - Change to use istreadm::readsome() instead of unsafe buffer call --- diff --git a/bootstrap/scanner.cc b/bootstrap/scanner.cc index 199da8fa..47127b93 100644 --- a/bootstrap/scanner.cc +++ b/bootstrap/scanner.cc @@ -62,7 +62,7 @@ char *Scanner::fill(char *cursor) delete [] bot; bot = buf; } - if((cnt = in.rdbuf()->sgetn((char*) lim, BSIZE)) != BSIZE) + if((cnt = in.readsome((char*) lim, BSIZE)) != BSIZE) { eof = &lim[cnt]; *eof++ = '\0'; } diff --git a/scanner.re b/scanner.re index dca10227..ebe5da12 100644 --- a/scanner.re +++ b/scanner.re @@ -60,7 +60,7 @@ char *Scanner::fill(char *cursor) delete [] bot; bot = buf; } - if((cnt = in.rdbuf()->sgetn((char*) lim, BSIZE)) != BSIZE) + if((cnt = in.readsome((char*) lim, BSIZE)) != BSIZE) { eof = &lim[cnt]; *eof++ = '\0'; }