change temp decl for buffer
move allocation for nullbuf to buffer.cpp