udf: Return -ENOMEM when allocation fails in udf_get_filename()
Return -ENOMEM when allocation fails in udf_get_filename(). Update udf_pc_to_char(), udf_readdir(), and udf_find_entry() to handle the error appropriately. This allows us to pass appropriate error to userspace instead of corrupting symlink contents by omitting some path elements. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jan Kara <jack@suse.cz>
Tento commit je obsažen v:
@@ -234,7 +234,7 @@ static struct fileIdentDesc *udf_find_entry(struct inode *dir,
|
||||
continue;
|
||||
|
||||
flen = udf_get_filename(sb, nameptr, lfi, fname, UDF_NAME_LEN);
|
||||
if (flen && udf_match(flen, fname, child->len, child->name))
|
||||
if (flen > 0 && udf_match(flen, fname, child->len, child->name))
|
||||
goto out_ok;
|
||||
}
|
||||
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele