fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

test_fgetws_dynamic.c (228B)


      1 #include "common.h"
      2 
      3 #define _GNU_SOURCE
      4 #include <wchar.h>
      5 
      6 int main(int argc, char** argv) {
      7   wchar_t buffer[8] = {L'A'};
      8 
      9   CHK_FAIL_START
     10   fgetws(buffer, argc, NULL);
     11   CHK_FAIL_END
     12 
     13   putwchar(buffer[0]);
     14   return ret;
     15 }