mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 09:15:11 +00:00
mountmgr: Change scope of variable pvd in VOLUME_GetSuperblockLabel (cppcheck).
The data in pvd was being accessed through the label_ptr variable after pvd went out of scope. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8e081d32bd
commit
656d7f58a1
|
@ -398,6 +398,7 @@ static void VOLUME_GetSuperblockLabel( struct volume *volume, HANDLE handle, con
|
|||
{
|
||||
const BYTE *label_ptr = NULL;
|
||||
DWORD label_len;
|
||||
BYTE pvd[BLOCK_SIZE];
|
||||
|
||||
switch (volume->fs_type)
|
||||
{
|
||||
|
@ -435,9 +436,6 @@ static void VOLUME_GetSuperblockLabel( struct volume *volume, HANDLE handle, con
|
|||
break;
|
||||
}
|
||||
case FS_UDF:
|
||||
{
|
||||
BYTE pvd[BLOCK_SIZE];
|
||||
|
||||
if(!UDF_Find_PVD(handle, pvd))
|
||||
{
|
||||
label_len = 0;
|
||||
|
@ -462,7 +460,6 @@ static void VOLUME_GetSuperblockLabel( struct volume *volume, HANDLE handle, con
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (label_len) RtlMultiByteToUnicodeN( volume->label, sizeof(volume->label) - sizeof(WCHAR),
|
||||
&label_len, (const char *)label_ptr, label_len );
|
||||
label_len /= sizeof(WCHAR);
|
||||
|
|
Loading…
Reference in a new issue