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>
Sat, 1 Oct 2011 23:26:04 +0000 (01:26 +0200)
commit95bb2c23e6e9c52a1e34916dff05b1d306278bc6
tree648aad9dc06e630ac450cb43726be68f761eb51d
parentb9da4235566ffdd649d7b4a6ca05cecd02cfbd20
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)

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sun Oct  2 01:26:05 CEST 2011 on sn-devel-104
source3/registry/reg_format.c