diff options
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/rpcinfo.c | 2 | ||||
-rw-r--r-- | sunrpc/xdr.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sunrpc/rpcinfo.c b/sunrpc/rpcinfo.c index 0df991ae47..30932c83a6 100644 --- a/sunrpc/rpcinfo.c +++ b/sunrpc/rpcinfo.c @@ -94,7 +94,7 @@ main(argc, argv) function = NONE; portnum = 0; errflg = 0; - while ((c = getopt(argc, argv, "ptubdn:")) != EOF) { + while ((c = getopt(argc, argv, "ptubdn:")) != -1) { switch (c) { case 'p': diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index c36afd983c..969fa6ba04 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -575,6 +575,8 @@ xdr_string(xdrs, cpp, maxsize) } /* fall through... */ case XDR_ENCODE: + if (sp == NULL) + return FALSE; size = strlen(sp); break; } |