diff options
author | scottl <scottl@FreeBSD.org> | 2006-01-14 17:59:28 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2006-01-14 17:59:28 +0000 |
commit | 2fb685782c5c22231bad6f477c3ddec6cf317760 (patch) | |
tree | 9dc56f9608f954b521385a63ecf1d57e53783725 /sys/dev/amr/amr.c | |
parent | 8378b938764f3f81c27a85b51f0fb23712ae4a1a (diff) | |
download | FreeBSD-src-2fb685782c5c22231bad6f477c3ddec6cf317760.zip FreeBSD-src-2fb685782c5c22231bad6f477c3ddec6cf317760.tar.gz |
Check the return value of copyin.
Found by: Coverity Prevent (tm)
Diffstat (limited to 'sys/dev/amr/amr.c')
-rw-r--r-- | sys/dev/amr/amr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index e55db75..b93135c 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) { |