Link Here
|
648 |
} |
648 |
} |
649 |
|
649 |
|
650 |
if (dir_length) { |
650 |
if (dir_length) { |
|
|
651 |
if ((dir_length + name_length) > sizeof(dirname)) { |
652 |
fprintf(stderr, "Insufficient buffer size\n"); |
653 |
exit(112); |
654 |
} |
651 |
strcat(dirname, hdr->name); |
655 |
strcat(dirname, hdr->name); |
652 |
strcpy(hdr->name, dirname); |
656 |
|
|
|
657 |
if ((dir_length + name_length) > sizeof(hdr->name)) { |
658 |
fprintf(stderr, "Insufficient buffer size\n"); |
659 |
exit(112); |
660 |
} |
661 |
strncpy(hdr->name, dirname, sizeof(hdr->name)); |
653 |
name_length += dir_length; |
662 |
name_length += dir_length; |
654 |
} |
663 |
} |