You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Staging: ti-st: writing past end of array
In the original source it would write past the end of the array before returning the error code. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2a8a4b7530
commit
0b6e7220ed
@@ -686,9 +686,8 @@ long st_register(struct st_proto_s *new_proto)
|
||||
default:
|
||||
pr_err("%d protocol not supported",
|
||||
new_proto->type);
|
||||
err = -EPROTONOSUPPORT;
|
||||
/* something wrong */
|
||||
break;
|
||||
spin_unlock_irqrestore(&st_gdata->lock, flags);
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
st_gdata->list[new_proto->type] = new_proto;
|
||||
st_gdata->protos_registered++;
|
||||
|
||||
Reference in New Issue
Block a user