Skip to content

Instantly share code, notes, and snippets.

@zwned
Created March 5, 2012 20:10
Show Gist options
  • Save zwned/1980787 to your computer and use it in GitHub Desktop.
Save zwned/1980787 to your computer and use it in GitHub Desktop.
io.sts level06
#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