* The identify_cookie was allocated unchecked, spotted by Stippi.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26576 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-07-23 14:53:15 +00:00
parent 5d0a5f7cac
commit fe08828a3c

View File

@ -67,6 +67,9 @@ bfs_identify_partition(int fd, partition_data *partition, void **_cookie)
return status;
identify_cookie *cookie = new(std::nothrow) identify_cookie;
if (cookie == NULL)
return B_NO_MEMORY;
memcpy(&cookie->super_block, &superBlock, sizeof(disk_super_block));
*_cookie = cookie;