# HG changeset patch # User Christian Urban # Date 1412632089 -3600 # Node ID 06cc381928659393ddd5d54352c7379192898050 # Parent 166a27693dcdff64b8eb7fa515376188fafca9d3 updated diff -r 166a27693dcd -r 06cc38192865 progs/C2.c --- a/progs/C2.c Mon Oct 06 21:29:13 2014 +0100 +++ b/progs/C2.c Mon Oct 06 22:48:09 2014 +0100 @@ -5,10 +5,12 @@ // Since gets() is insecure and produces lots // of warnings, thereofre I use my own input // function instead. +int i; +char ch; + void get_line(char *dst) { char buffer[8]; - int i = 0; - char ch; + i = 0; while ((ch = getchar()) != '\n') { buffer[i++] = ch; } diff -r 166a27693dcd -r 06cc38192865 progs/args2-bad --- a/progs/args2-bad Mon Oct 06 21:29:13 2014 +0100 +++ b/progs/args2-bad Mon Oct 06 22:48:09 2014 +0100 @@ -1,3 +1,3 @@ #!/bin/sh -perl -e 'print "test\nAAAAAAAABBBB\xc8\x84\x04\x08\n"' \ No newline at end of file +perl -e 'print "test\nAAAAAAAABBBB\x2c\x85\x04\x08\n"' \ No newline at end of file