fortify-headers

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

test_strrchr_dynamic_read.c (334B)


      1 #include "common.h"
      2 
      3 #include <string.h>
      4 
      5 int main(int argc, char** argv) {
      6 #if 0
      7   char buffer[] = {'1', '2', '3', '4', '5'};
      8   const char* padding = "ABCDEFGHIJKLMN";
      9   strrchr(buffer, (int)'4');
     10   puts(buffer);
     11 
     12   CHK_FAIL_START
     13   strrchr(buffer, (int)'A');
     14   CHK_FAIL_END
     15 
     16   puts(buffer);
     17   return ret;
     18 #else
     19   return 0;
     20 #endif
     21 }