mirror of
https://github.com/reactos/reactos.git
synced 2024-06-27 16:31:30 +00:00
[LSASRV] - Correctly set return values in LsapGetObjectAttribute
[CDMAKE] - Handle out-of-memory condition - Patch by Samuel Serapion svn path=/trunk/; revision=54866
This commit is contained in:
parent
f2d3731646
commit
900f2cecbe
|
@ -510,13 +510,13 @@ LsapGetObjectAttribute(PLSA_DB_OBJECT DbObject,
|
||||||
if (AttributeData == NULL || *AttributeSize == 0)
|
if (AttributeData == NULL || *AttributeSize == 0)
|
||||||
{
|
{
|
||||||
*AttributeSize = ValueSize;
|
*AttributeSize = ValueSize;
|
||||||
Status == STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
else if (*AttributeSize < ValueSize)
|
else if (*AttributeSize < ValueSize)
|
||||||
{
|
{
|
||||||
*AttributeSize = ValueSize;
|
*AttributeSize = ValueSize;
|
||||||
Status == STATUS_BUFFER_OVERFLOW;
|
Status = STATUS_BUFFER_OVERFLOW;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -633,6 +633,8 @@ void parse_filename_into_dirrecord ( const char* filename, PDIR_RECORD d, BOOL d
|
||||||
if (joliet_length > 64)
|
if (joliet_length > 64)
|
||||||
error_exit ( "'%s' is not Joliet, aborting...", filename );
|
error_exit ( "'%s' is not Joliet, aborting...", filename );
|
||||||
d->joliet_name = malloc(joliet_length + 1);
|
d->joliet_name = malloc(joliet_length + 1);
|
||||||
|
if (d->joliet_name == NULL)
|
||||||
|
error_exit("Insufficient memory");
|
||||||
strcpy(d->joliet_name, filename);
|
strcpy(d->joliet_name, filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue