aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2014-10-28 15:28:20 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2014-10-28 15:28:20 +0000
commit0a2c94b86efea0774f26af5a1e45fecd9770b8b1 (patch)
tree55b8b2977c2be396e61f51cb119f65f88d3c2d27 /sys/net/if_spppsubr.c
parent4f3dc900231ae7975a614581b973ce530836a0c9 (diff)
downloadsrc-0a2c94b86efea0774f26af5a1e45fecd9770b8b1.tar.gz
src-0a2c94b86efea0774f26af5a1e45fecd9770b8b1.zip
Replace some calls to fuword() by fueword() with proper error checking.
Sponsored by: The FreeBSD Foundation Tested by: pho MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=273784
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 9dc55c5ba12c..c0f8e39c3963 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -5060,7 +5060,8 @@ sppp_params(struct sppp *sp, u_long cmd, void *data)
* Check the cmd word first before attempting to fetch all the
* data.
*/
- if ((subcmd = fuword(ifr->ifr_data)) == -1) {
+ rv = fueword(ifr->ifr_data, &subcmd);
+ if (rv == -1) {
rv = EFAULT;
goto quit;
}