PDA

View Full Version : differential media build and buffer overruns



crehbein
05-14-2004, 03:15 PM
Not too long ago (I believe with the release of VS .NET 2003), MS made the /GS compiler switch enabled by default. This switch forces checks on stack buffers at runtime and kills the app if it finds one.

Today, I created a differential media build and tried to apply it to an installed copy of our application. The update itself worked fine, but the first time I ran the updated version of our app, MS complained about a buffer overrun.

I can manually copy over all of the updated files and the updated executable does not throw the overrun error. The only time this condition is triggered is if the exe was "updated" using InstallShield. This behavior is seen on WXP SP1 - I haven't had the chance to try it out on other OS's yet.

I understand there could be a kajillion things wrong here, many of which have nothing to do with InstallShield, but has anyone seen this behavior in the past? Since IS seems to be the discriminator, I thought I'd start here.

BugFixer
05-27-2004, 02:59 PM
More than likely you have a buffer overrun in your own source code that is causing the error. Perhaps trying to read registry key data into a smaller buffer. I'd suggest using a tool such as Prexis 2.0 from Ounce Labs to scan your code and find the bug.

crehbein
05-27-2004, 03:07 PM
Good one.. :)

As for the original problem, it indeed was a problem in the application's code, not with InstallShield. Well, at least not directly.