Created
March 5, 2012 20:10
-
-
Save zwned/1980787 to your computer and use it in GitHub Desktop.
io.sts level06
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<string.h> | |
// The devil is in the details - nnp | |
void copy_buffers(char *argv[]) | |
{ | |
char buf1[32], buf2[32], buf3[32]; | |
strncpy(buf2, argv[1], 31); | |
strncpy(buf3, argv[2], sizeof(buf3)); | |
strcpy(buf1, buf3); | |
} | |
int main(int argc, char *argv[]) | |
{ | |
copy_buffers(argv); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment