Commit graph

2 commits

Author SHA1 Message Date
Simon Tatham
1c1c3850e8 Stop using real pointers as handles in makemsi.c.
Upgrading to Ubuntu 18.04, which seems to have become more prone to
allocating process memory above the 4G boundary, has revealed that the
client code of the phony msi.dll functions is not in fact prepared to
accept arbitrary machine-word sized pointer values. It's expecting
32-bit handles, so we were segfaulting because MsiDatabaseImportW was
only being given the bottom 32 bits of the 64-bit pointer that
MsiOpenDatabaseW had returned.

So now I just keep a trivial registry of small integer handle values
and the pointers they map to. I don't even bother to recycle them -
the process isn't expected to run for long enough for me to care.
2018-05-14 18:14:12 +01:00
Simon Tatham
a568db73a6 Rename fake-msi.c to makemsi.c.
It's now a sensible source flie containing a set of routines that do
something coherently connected to each other, so it doesn't deserve
that 'fake-' prefix that I used for the previous monolithic files full
of tangled-together stuff.

While I'm here, I've also made up nicer (i.e. more distinguishable)
random magic numbers for the structure-type disambiguation.
2017-05-18 08:27:29 +01:00
Renamed from fake-msi.c (Browse further)