BUG: Running past end of buffer and leak
BUG: Running past end of buffer and leak

ifstream::read does not terminate the buffer with null. The while loop
was running past the end of the buffer. This patch appends a null
before processing the string.

The buffer was allocated but never freed.

Change-Id: I9bedd7c7825424547ad4892d7ae2348ce0379d19

hendradarwin/VTK,biddisco/VTK,ashray/VTK-EVM,collects/VTK,jmerkow/VTK,collects/VTK,sumedhasingla/VTK,johnkit/vtk-dev,candy7393/VTK,mspark93/VTK,johnkit/vtk-dev,hendradarwin/VTK,sankhesh/VTK,collects/VTK,mspark93/VTK,biddisco/VTK,candy7393/VTK,jmerkow/VTK,keithroe/vtkoptix,berendkleinhaneveld/VTK,demarle/VTK,sumedhasingla/VTK,ashray/VTK-EVM,msmolens/VTK,mspark93/VTK,ashray/VTK-EVM,biddisco/VTK,sankhesh/VTK,msmolens/VTK,sumedhasingla/VTK,sankhesh/VTK,sumedhasingla/VTK,johnkit/vtk-dev,sumedhasingla/VTK,keithroe/vtkoptix,hendradarwin/VTK,demarle/VTK,sankhesh/VTK,gram526/VTK,SimVascular/VTK,msmolens/VTK,sumedhasingla/VTK,SimVascular/VTK,SimVascular/VTK,gram526/VTK,ashray/VTK-EVM,keithroe/vtkoptix,gram526/VTK,hendradarwin/VTK,demarle/VTK,keithroe/vtkoptix,demarle/VTK,jmerkow/VTK,mspark93/VTK,mspark93/VTK,jmerkow/VTK,johnkit/vtk-dev,jmerkow/VTK,sankhesh/VTK,mspark93/VTK,candy7393/VTK,berendkleinhaneveld/VTK,jmerkow/VTK,msmolens/VTK,keithroe/vtkoptix,johnkit/vtk-dev,keithroe/vtkoptix,berendkleinhaneveld/VTK,hendradarwin/VTK,ashray/VTK-EVM,collects/VTK,SimVascular/VTK,sumedhasingla/VTK,biddisco/VTK,collects/VTK,demarle/VTK,candy7393/VTK,msmolens/VTK,candy7393/VTK,SimVascular/VTK,demarle/VTK,collects/VTK,ashray/VTK-EVM,gram526/VTK,msmolens/VTK,biddisco/VTK,candy7393/VTK,biddisco/VTK,demarle/VTK,berendkleinhaneveld/VTK,SimVascular/VTK,gram526/VTK,msmolens/VTK,berendkleinhaneveld/VTK,hendradarwin/VTK,SimVascular/VTK,candy7393/VTK,gram526/VTK,mspark93/VTK,sankhesh/VTK,mspark93/VTK,berendkleinhaneveld/VTK,jmerkow/VTK,gram526/VTK,jmerkow/VTK,biddisco/VTK,hendradarwin/VTK,ashray/VTK-EVM,sankhesh/VTK,sumedhasingla/VTK,sankhesh/VTK,candy7393/VTK,SimVascular/VTK,gram526/VTK,johnkit/vtk-dev,demarle/VTK,msmolens/VTK,keithroe/vtkoptix,ashray/VTK-EVM,berendkleinhaneveld/VTK,keithroe/vtkoptix,johnkit/vtk-dev