Fixed memory allocation for translating junction points
parent
e5a1325ed3
commit
52d5e40f93
|
@ -598,7 +598,7 @@ static char *ntfs_get_fulllink(ntfs_volume *vol, ntfschar *junction,
|
||||||
if (*p == '/')
|
if (*p == '/')
|
||||||
level++;
|
level++;
|
||||||
fulltarget = (char*)ntfs_malloc(3*level
|
fulltarget = (char*)ntfs_malloc(3*level
|
||||||
+ sizeof(mappingdir) + count - 4);
|
+ sizeof(mappingdir) + strlen(target) - 3);
|
||||||
if (fulltarget) {
|
if (fulltarget) {
|
||||||
fulltarget[0] = 0;
|
fulltarget[0] = 0;
|
||||||
if (level > 1) {
|
if (level > 1) {
|
||||||
|
@ -721,7 +721,7 @@ static char *ntfs_get_abslink(ntfs_volume *vol, ntfschar *junction,
|
||||||
if (*p == '/')
|
if (*p == '/')
|
||||||
level++;
|
level++;
|
||||||
fulltarget = (char*)ntfs_malloc(3*level
|
fulltarget = (char*)ntfs_malloc(3*level
|
||||||
+ sizeof(mappingdir) + count - 4);
|
+ sizeof(mappingdir) + strlen(target) - 3);
|
||||||
if (fulltarget) {
|
if (fulltarget) {
|
||||||
fulltarget[0] = 0;
|
fulltarget[0] = 0;
|
||||||
if (level > 1) {
|
if (level > 1) {
|
||||||
|
|
Loading…
Reference in New Issue