msi(1/3): Don't crash if rec is NULL

Jeremy White jwhite at
Fri Sep 14 15:23:19 CDT 2007

Your patches also cure the symptom, Juan; thanks.

I agree with the concerns James expressed, though:  I didn't feel that I
understood the whole story.  (Heck, I really have *no* clue what I'm
talking about <grin>).

However, the call to MSI_FormatMessageW is not an internal call, I think;
it looks to me as though it's called as a direct result of an inbound
call to MsiFormatRecordA():
  0014:Call msi.MsiFormatRecordA(00000002,00000005,1000e768,7b7ea55c) ret=10003064
  (in   about 10-15 lines from bottom)

So the question in my mind is:
  Can a record still be a legitimate record if MSI_RecordGetFieldCount returns 0?

If the answer is yes, then I think the patches are correct.



> The public APIs check for bad records and return ERROR_INVALID_HANDLE,
> so they will never send in a NULL rec.  Something internally is
> sending in a NULL rec, and that needs to be fixed.

More information about the wine-devel mailing list