summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/plucker_base.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp
index 81614f5..849edfc 100644
--- a/noncore/apps/opie-reader/plucker_base.cpp
+++ b/noncore/apps/opie-reader/plucker_base.cpp
@@ -46,3 +46,4 @@ unsuspend();
{
- fread(buffer, reclen, sizeof(char), fin);
+ size_t bytes_read = fread(buffer, reclen, sizeof(char), fin);
+ buffer[bytes_read] = '\0';
}
@@ -62,3 +63,4 @@ unsuspend();
fread(readbuffer, reclen, sizeof(char), fin);
- (*m_decompress)(readbuffer, reclen, buffer, buffersize);
+ size_t bytes_read = (*m_decompress)(readbuffer, reclen, buffer, buffersize);
+ buffer[bytes_read] = '\0';
if (reclen > compressedbuffersize)