invalid_parameter being called during fread


I have an utility service that does file copy.

In my utility I'm writing to temp file in C:\WINDOWS\Temp and later copying the content of the temp file to my actual file.

But sometime my service crashes with the below call stack. I'm not sure what is the reason.

I checked if the temp file is corrupted but i see that the temp file is valid.

Any idea what would be causing this crash?

00000000`1844d8c0 00000000`552f0468 msvcr100!wmktemp+0x24c
00000000`1844ded0 00000000`552f04f6 msvcr100!invoke_watson+0x18
00000000`1844df00 00000000`552f0519 msvcr100!invalid_parameter+0x6e
00000000`1844df40 00000000`552ec9f4 msvcr100!invalid_parameter_noinfo+0x19
00000000`1844df80 00000000`552aea71 msvcr100!read+0x100
00000000`1844dfd0 00000000`552aebb2 msvcr100!fread_nolock_s+0x19d
00000000`1844e030 00000000`552aec00 msvcr100!fread_s+0x7a
00000000`1844e070 000007ff`182412bb msvcr100!fread+0x18

Topic archived. No new replies allowed.