Project

General

Profile

Submit #2862

[PATCH] boot0cfg: check result of malloc in read_mbr()

Added by Anonymous over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
Start date:
12/08/2015
Due date:
% Done:

0%


Description

Hello All,

We allocating buffer for MBR in the read_mbr() function. The malloc()
may return NULL, so this patch checks the result of the malloc and
exit with the error if we can't allocate memory.

Besides this we close file descriptor.

0001-boot0cfg-check-result-of-malloc-in-read_mbr.patch View (1.17 KB) Anonymous, 12/08/2015 10:43 AM

History

#1 Updated by Anonymous over 1 year ago

  • Status changed from New to Feedback

#2 Updated by swildner over 1 year ago

  • Status changed from Feedback to Closed

I've pushed it. Thanks.

Also available in: Atom PDF