Skip to content

Instantly share code, notes, and snippets.

@beerbong
Created January 9, 2015 03:07
Show Gist options
  • Save beerbong/f0e50b9cf7d415d57106 to your computer and use it in GitHub Desktop.
Save beerbong/f0e50b9cf7d415d57106 to your computer and use it in GitHub Desktop.
char** names = (char**)malloc(z_alloc * sizeof(char*));
int num = 0;
for (; num < z_size - 1; num++) {
// here i am just duplicating the string
// but names[num] should be " - " + zips[num]
// everything i tried provokes an overflow error
names[num] = strdup(zips[num]);
}
names[z_size] = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment