diff options
Diffstat (limited to 'Library')
-rw-r--r-- | Library/CommonLib/EfiBio.c | 3 | ||||
-rw-r--r-- | Library/GraphLib/EfiGraph.c | 1 | ||||
-rw-r--r-- | Library/VeraCryptLib/DcsVeraCrypt.c | 7 |
3 files changed, 8 insertions, 3 deletions
diff --git a/Library/CommonLib/EfiBio.c b/Library/CommonLib/EfiBio.c index 9577c08..e6509f9 100644 --- a/Library/CommonLib/EfiBio.c +++ b/Library/CommonLib/EfiBio.c @@ -71,6 +71,7 @@ EfiGetHandles( {
EFI_STATUS res = EFI_BUFFER_TOO_SMALL;
UINTN BufferSize;
+ if ((Buffer == NULL) || (Count == NULL)) return EFI_INVALID_PARAMETER; if(*Buffer != NULL) MEM_FREE(*Buffer);
*Count = 0;
*Buffer = (EFI_HANDLE*) MEM_ALLOC(sizeof(EFI_HANDLE));
@@ -80,7 +81,7 @@ EfiGetHandles( if (res == RETURN_BUFFER_TOO_SMALL) {
MEM_FREE(*Buffer);
*Buffer = (EFI_HANDLE*)MEM_ALLOC(BufferSize);
- if (!Buffer) {
+ if (*Buffer == NULL) { return EFI_OUT_OF_RESOURCES;
}
res = gBS->LocateHandle(SearchType, Protocol, SearchKey, &BufferSize, *Buffer);
diff --git a/Library/GraphLib/EfiGraph.c b/Library/GraphLib/EfiGraph.c index b8e8e2e..3e90646 100644 --- a/Library/GraphLib/EfiGraph.c +++ b/Library/GraphLib/EfiGraph.c @@ -235,6 +235,7 @@ BltPoint( IN UINTN x,
IN UINTN y
) {
+ if (!draw) draw = &gDrawContext; if (draw->Brush == NULL) return BltPointSingle(blt, draw, x, y);
else
{
diff --git a/Library/VeraCryptLib/DcsVeraCrypt.c b/Library/VeraCryptLib/DcsVeraCrypt.c index 9cf57ce..ba92931 100644 --- a/Library/VeraCryptLib/DcsVeraCrypt.c +++ b/Library/VeraCryptLib/DcsVeraCrypt.c @@ -37,8 +37,11 @@ BOOL ConfigRead(char *configKey, char *configValue, int maxValueSize) {
char *xml;
- if (ConfigBuffer == NULL)
- FileLoad(NULL, L"\\EFI\\VeraCrypt\\DcsProp", &ConfigBuffer, &ConfigBufferSize);
+ if (ConfigBuffer == NULL) { + if (FileLoad(NULL, L"\\EFI\\VeraCrypt\\DcsProp", &ConfigBuffer, &ConfigBufferSize) != EFI_SUCCESS) { + return FALSE; + } + } xml = ConfigBuffer;
if (xml != NULL)
|