mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
Fixed memory allocation for translating junction points
This commit is contained in:
parent
e5a1325ed3
commit
52d5e40f93
@ -598,7 +598,7 @@ static char *ntfs_get_fulllink(ntfs_volume *vol, ntfschar *junction,
|
||||
if (*p == '/')
|
||||
level++;
|
||||
fulltarget = (char*)ntfs_malloc(3*level
|
||||
+ sizeof(mappingdir) + count - 4);
|
||||
+ sizeof(mappingdir) + strlen(target) - 3);
|
||||
if (fulltarget) {
|
||||
fulltarget[0] = 0;
|
||||
if (level > 1) {
|
||||
@ -721,7 +721,7 @@ static char *ntfs_get_abslink(ntfs_volume *vol, ntfschar *junction,
|
||||
if (*p == '/')
|
||||
level++;
|
||||
fulltarget = (char*)ntfs_malloc(3*level
|
||||
+ sizeof(mappingdir) + count - 4);
|
||||
+ sizeof(mappingdir) + strlen(target) - 3);
|
||||
if (fulltarget) {
|
||||
fulltarget[0] = 0;
|
||||
if (level > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user