updated
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Mon, 06 Oct 2014 22:48:09 +0100
changeset 215 06cc38192865
parent 214 166a27693dcd
child 216 38718062709a
updated
progs/C2.c
progs/args2-bad
--- 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;
   }
--- 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