Consider the following example:

try {
  static const char silly_example[] = "just a %silly% example";
  char expanded[100];
  if (!ExpandEnvironmentStrings(silly_example, expanded, sizeof expanded))
    throw rdr::Exception("failed to expand %s", silly_example);
} catch (rdr::exception &e) {
  vlog.error(e.str());
}

The %s from %silly% directs vlog.error() to substitute a non-existing char 
* argument, which might cause odd things including crash.

Regards,
Jochen


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to