Vulnerability Development mailing list archives

Microsoft _snprintf stack overflow (note n)


From: "George Datuashvili" <gdatuashvili () siebel com>
Date: Tue, 12 Mar 2002 10:33:28 -0800

Following code just crashes:

#include <stdio.h>
void main()
{
   char buf[32];
   _snprintf (buf, 10, "%*.*d", 0, 22222222, 0);
}

Search for ascii and unicode %*.* and %.* strings in system32\*.dll reveals
quite a few dlls that use those patterns. I wonder if actual precision value
can be supplied by end users...


Current thread: