Commit 0e53642c authored by Petri Hintukainen's avatar Petri Hintukainen

Check malloc result

parent 04a620c0
......@@ -1599,6 +1599,9 @@ ssize_t udfread_file_read(UDFFILE *p, void *buf, size_t bytes)
/* allocate temp storage for input block */
if (!p->block) {
p->block_mem = malloc(2 * UDF_BLOCK_SIZE);
if (!p->block_mem) {
return -1;
}
p->block = ALIGN(p->block_mem, UDF_BLOCK_SIZE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment