From a4d3c7448799626677fb05f5b91ca4428831dabd Mon Sep 17 00:00:00 2001 From: Scott Long Date: Sat, 14 Jan 2006 17:59:28 +0000 Subject: [PATCH] Check the return value of copyin. Found by: Coverity Prevent (tm) --- sys/dev/amr/amr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index e55db75c2ed..b93135c9081 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -531,7 +531,8 @@ amr_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, ac = NULL; ap = NULL; - copyin(addr, &ali, sizeof(ali)); + if ((error = copyin(addr, &ali, sizeof(ali))) != 0) + return (error); switch (ali.ui.fcs.opcode) { case 0x82: switch(ali.ui.fcs.subopcode) {