Fix a potential problem with reading tokens larger then BUFSIZ
authorJonas Fonseca <fonseca@diku.dk>
Thu, 19 Feb 2009 16:56:22 +0000 (17:56 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Thu, 19 Feb 2009 20:28:14 +0000 (21:28 +0100)
commit920d8d1cdc485bd8222e3cffe9d694037aaab488
treee4a53b125da7cff982bdf1a98b52679d3b5c30e9
parent656883f1f076a33de4a643e4621953d8a589d59b
Fix a potential problem with reading tokens larger then BUFSIZ

If io_get() is not able to find the end marker it will go into
an infinite loop. To fix this make it possible to reallocate and
increase the buffer if necessary.

To avoid problems with callers reading into a stack allocated buffer,
change these to no longer use the "zero-copy" strategy. This in turns
cleans the callers up a bit.
tig.c