We have some issues with the the Intel C++ compiler (version 22.214.171.124 Build 20130118) that seem related to the swscanf_s function and the /Qip option. Depending of the code used, either the program crashes completely or gives incorrect results when /Qip is used.
I have simplified the code and the command line used a lot (the code is originally from Media Player Classic HomeCinema) to make reproducing the issue easy. The test.cpp file is the simplest example I could come up with, it can be compiled with icl /Qip /o test.exe test.cpp to reproduce the issue.
If you need any other information let me know!
Thank you very much for reporting this issue with a small testcase. I can duplicate the problem and will submit a bug report to the compiler team.
C:\test>icl /O1 /Qip test.cpp
C:\test>icl /O2 /Qip test.cpp
There are several workarounds: /O1 or /O2 /Ob2.