diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-10-13 21:14:56 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-10-13 21:14:56 +0000 |
commit | dd276b011cea2ccebb9bd30cbdb066dde1a53944 (patch) | |
tree | a236295dde6d29b017f27690f004b0758caca627 | |
parent | b27f3f8fe80cc2dcbf66f975c4d987209d529586 (diff) |
return correct error for buffer too small (Solaris)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1792 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nss/hosts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nss/hosts.c b/nss/hosts.c index 6a271e1..a02a730 100644 --- a/nss/hosts.c +++ b/nss/hosts.c @@ -279,7 +279,10 @@ static nss_status_t read_hoststring(TFILE *fp,int af,nss_XbyY_args_t *args,int e } } if (strlen(args->buf.buffer)>=args->buf.buflen-1) - return NSS_STR_PARSE_PARSE; + { + NSS_ARGS(args)->erange=1; + return NSS_NOTFOUND; + } args->returnval=args->buf.buffer; args->returnlen=strlen(args->returnval); return NSS_STATUS_SUCCESS; |