Revision 363a37d5 block-vvfat.c
b/block-vvfat.c | ||
---|---|---|
1733 | 1733 |
char path2[PATH_MAX]; |
1734 | 1734 |
|
1735 | 1735 |
assert(path_len < PATH_MAX); /* len was tested before! */ |
1736 |
strcpy(path2, path);
|
|
1736 |
pstrcpy(path2, sizeof(path2), path);
|
|
1737 | 1737 |
path2[path_len] = '/'; |
1738 | 1738 |
path2[path_len + 1] = '\0'; |
1739 | 1739 |
|
... | ... | |
1807 | 1807 |
fprintf(stderr, "Name too long: %s/%s\n", path, lfn.name); |
1808 | 1808 |
goto fail; |
1809 | 1809 |
} |
1810 |
strcpy(path2 + path_len + 1, (char*)lfn.name); |
|
1810 |
pstrcpy(path2 + path_len + 1, sizeof(path2) - path_len - 1, |
|
1811 |
(char*)lfn.name); |
|
1811 | 1812 |
|
1812 | 1813 |
if (is_directory(direntries + i)) { |
1813 | 1814 |
if (begin_of_direntry(direntries + i) == 0) { |
... | ... | |
2372 | 2373 |
|
2373 | 2374 |
assert(!strncmp(m->path, mapping->path, l2)); |
2374 | 2375 |
|
2375 |
strcpy(new_path, mapping->path); |
|
2376 |
strcpy(new_path + l1, m->path + l2); |
|
2376 |
pstrcpy(new_path, l + diff + 1, mapping->path); |
|
2377 |
pstrcpy(new_path + l1, l + diff + 1 - l1, |
|
2378 |
m->path + l2); |
|
2377 | 2379 |
|
2378 | 2380 |
schedule_rename(s, m->begin, new_path); |
2379 | 2381 |
} |
Also available in: Unified diff