This commit is contained in:
Miek Gieben 2012-01-05 13:22:02 +01:00
parent f999d52e7e
commit 81e8dc0046
1 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import (
) )
// Only used when debugging the parser itself. // Only used when debugging the parser itself.
var _DEBUG = false var _DEBUG = true
// Tokinize a RFC 1035 zone file. The tokenizer will normalize it: // Tokinize a RFC 1035 zone file. The tokenizer will normalize it:
// * Add ownernames if they are left blank; // * Add ownernames if they are left blank;
@ -303,6 +303,9 @@ func zlexer(r io.Reader, c chan lex) {
if err == io.EOF { if err == io.EOF {
stop = true stop = true
} }
if err == nil && n < MaxMsgSize {
stop = true
}
l.column = 0 l.column = 0
l.line = 1 // Yeah, start at one l.line = 1 // Yeah, start at one
for { for {
@ -459,7 +462,6 @@ func zlexer(r io.Reader, c chan lex) {
brace++ brace++
case ')': case ')':
if commt { if commt {
p++
break break
} }
if escape { if escape {
@ -510,7 +512,7 @@ func zlexer(r io.Reader, c chan lex) {
n = n1 + n2/// JAJAJA n = n1 + n2/// JAJAJA
// println("****Wat heb ik", string(buf[:q]), "Q", "n:", n) // println("****Wat heb ik", string(buf[:q]), "Q", "n:", n)
// println("****Wat heb ik", string(buf[:q+10]), "Q") // println("****Wat heb ik", string(buf[:q+10]), "Q")
// println("wat is n nu", n) println("wat is n nu", n)
} }
} }
// It this need anymore??? // It this need anymore???