]> granicus.if.org Git - re2c/commitdiff
- Change to use istreadm::readsome() instead of unsafe buffer call
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 8 Jan 2006 23:28:03 +0000 (23:28 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 8 Jan 2006 23:28:03 +0000 (23:28 +0000)
bootstrap/scanner.cc
scanner.re

index 199da8fa0a501bcc1be0bbd558c01ada2f58f8db..47127b93a5ab0cff598034f253ffbb22b7a069c9 100644 (file)
@@ -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';
                }
index dca102275171d5f9fbbbe683b088c9a7e0e89156..ebe5da12165eebaf4e1ed2a16406414a702b1ab9 100644 (file)
@@ -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';
                }