s3:registry: fix the test for a REG_SZ blob possibly being a zero terminated ucs2...
authorMichael Adam <obnox@samba.org>
Thu, 29 Sep 2011 16:06:56 +0000 (18:06 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Oct 2011 13:21:19 +0000 (15:21 +0200)
commit7f2923b88cee4b6382bebba8f125c50b8b60b223
tree1b1ebff6005f29d7a87dac3f8d259d478de52f2a
parentcca0e52a577c4be2532594863e5ac9ed39d90ec5
s3:registry: fix the test for a REG_SZ blob possibly being a zero terminated ucs2 string

1. catch data blobs with odd number of bytes (not an ucs2 string at all)
2. test the right ucs2 character to be 0
   (prevent out-of bounds access/potential segfault)
source3/registry/reg_format.c