Fixed uninitialized read while Save()
authornvalimak <nvalimak@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Mon, 9 Feb 2009 13:26:58 +0000 (13:26 +0000)
committernvalimak <nvalimak@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Mon, 9 Feb 2009 13:26:58 +0000 (13:26 +0000)
git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/TextCollection@163 3cdefd35-fc62-479d-8e8d-bae585ffb9ca

BlockArray.h

index 99aff91..3671d08 100644 (file)
@@ -16,6 +16,8 @@ public:
        n = len;
        blockLength = blockLen;
        data = new ulong[n*blockLength/W +1];
+       for (ulong i = 0; i < n*blockLength/W +1; ++i)
+           data[i] = 0;
     }
     ~BlockArray() {
        delete [] data;