diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-03-24 19:52:00 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-03-24 19:52:00 +0000 |
commit | 708d2a1e64317a9537b004b1dc4fc03811a46a78 (patch) | |
tree | 884d0c4594bc7d956ec78cba780ce1aba08520a7 /winsup/utils/regtool.cc | |
parent | 4951591733776a53e1ebac10f3e8117b7d2b3c69 (diff) | |
download | cygnal-708d2a1e64317a9537b004b1dc4fc03811a46a78.tar.gz cygnal-708d2a1e64317a9537b004b1dc4fc03811a46a78.tar.bz2 cygnal-708d2a1e64317a9537b004b1dc4fc03811a46a78.zip |
* regtool.cc (find_key): Fix allocation size of "value".
Diffstat (limited to 'winsup/utils/regtool.cc')
-rw-r--r-- | winsup/utils/regtool.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index 487e779db..d8a492c37 100644 --- a/winsup/utils/regtool.cc +++ b/winsup/utils/regtool.cc @@ -377,7 +377,7 @@ find_key (int howmanyparts, REGSAM access, int option = 0) if (value) free (value); len = mbstowcs (NULL, n, 0) + 1; - value = (wchar_t *) malloc (len); + value = (wchar_t *) malloc (len * sizeof (wchar_t)); mbstowcs (value, n, len); return; } @@ -387,7 +387,7 @@ find_key (int howmanyparts, REGSAM access, int option = 0) if (value) free (value); len = mbstowcs (NULL, e + 1, 0) + 1; - value = (wchar_t *) malloc (len); + value = (wchar_t *) malloc (len * sizeof (wchar_t)); mbstowcs (value, e + 1, len); } } |