* regtool.cc (find_key): Fix allocation size of "value".
This commit is contained in:
		| @@ -1,3 +1,7 @@ | ||||
| 2010-03-24  Corinna Vinschen  <corinna@vinschen.de> | ||||
|  | ||||
| 	* regtool.cc (find_key): Fix allocation size of "value". | ||||
|  | ||||
| 2010-03-23  Corinna Vinschen  <corinna@vinschen.de> | ||||
|  | ||||
| 	* locale.cc (add_locale_alias_locales): Always use loc_num at function | ||||
|   | ||||
| @@ -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); | ||||
| 	} | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user