#2097: bug in regEnumKeys (System.Win32.Registry)
-------------------------------+--------------------------------------------
Reporter: MagnusTherning | Owner: igloo
Type: merge | Status: new
Priority: normal | Milestone: 6.8.3
Component: libraries (other) | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Windows |
-------------------------------+--------------------------------------------
Comment (by igloo):
Replying to [comment:6 MagnusTherning]:
> Replying to [comment:5 igloo]:
> > Fixed:
> > {{{
> > Sun Apr 6 21:50:51 BST 2008 Ian Lynagh <[EMAIL PROTECTED]>
> > * malloc a big enough buffer for the registry functions. Fixes trac
#2097.
> > We were mallocing a byte per tchar, but tchars are normally 2 bytes
big...
> > I think they are at most 4 bytes, so we now malloc 4 * #tchars. Not
sure
> > if there is a proper function I should be using for this?
> > }}}
>
> One way to be sure is to switch to using wide characters explicitly,
i.e. to use RegOpenKeyExW rather than RegOpenKeyEx.
We are using wide characters explicitly (`RegEnumKeyW`); the question is
how large a buffer to pass as the third argument.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2097#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs