mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-04-24 07:13:45 +03:00
fixup! vrclient: Allocate memory for every path conversion.
This commit is contained in:
parent
fd62ba3df4
commit
608505ee78
@ -103,7 +103,7 @@ char *vrclient_dos_to_unix_path( const char *src )
|
|||||||
if (!src) return NULL;
|
if (!src) return NULL;
|
||||||
|
|
||||||
*dst = 0;
|
*dst = 0;
|
||||||
if (*src) goto done;
|
if (!*src) goto done;
|
||||||
|
|
||||||
if(IS_ABSOLUTE(src)){
|
if(IS_ABSOLUTE(src)){
|
||||||
/* absolute path, use wine conversion */
|
/* absolute path, use wine conversion */
|
||||||
@ -146,7 +146,7 @@ char *vrclient_dos_to_unix_path( const char *src )
|
|||||||
done:
|
done:
|
||||||
len = strlen( buffer );
|
len = strlen( buffer );
|
||||||
if (!(dst = HeapAlloc( GetProcessHeap(), 0, len + 1 ))) return NULL;
|
if (!(dst = HeapAlloc( GetProcessHeap(), 0, len + 1 ))) return NULL;
|
||||||
memcpy( dst, buffer, len );
|
memcpy( dst, buffer, len + 1 );
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user