text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53b.c
  Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
  Template File: sources-sinks-53b.tmpl.c
  */
  /*
   * @description
   * CWE: 134 Uncontrolled Format String
   * BadSource: fromConsole Read input from the console
   * GoodSource: Copy a fixed string into data
   * Sinks: printf
   *    GoodSink: wprintf with "%s" as the first argument and data as the second
   *    BadSink : wprintf with only data as an argument
   * Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files
   *
   * */
  
  #include "std_testcase.h"
  
  #ifndef OMITBAD
  
  /* bad function declaration */
  void CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53c_bad_sink(wchar_t * data);
  
  void CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53b_bad_sink(wchar_t * data)
  {
      CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53c_bad_sink(data);
  }
  
  #endif /* OMITBAD */
  
  #ifndef OMITGOOD
  
  /* goodG2B uses the GoodSource with the BadSink */
  void CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53c_goodG2B_sink(wchar_t * data);
  
  void CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53b_goodG2B_sink(wchar_t * data)
  {
      CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53c_goodG2B_sink(data);
  }
  
  /* goodB2G uses the BadSource with the GoodSink */
  void CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53c_goodB2G_sink(wchar_t * data);
  
  void CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53b_goodB2G_sink(wchar_t * data)
  {
      CWE134_Uncontrolled_Format_String__wchar_t_fromConsole_printf_53c_goodB2G_sink(data);
  }
  
  #endif /* OMITGOOD */
  