diff options
Diffstat (limited to 'gshadow/sgetsgent_r.c')
-rw-r--r-- | gshadow/sgetsgent_r.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gshadow/sgetsgent_r.c b/gshadow/sgetsgent_r.c index ea085e91d7..c75624e1f7 100644 --- a/gshadow/sgetsgent_r.c +++ b/gshadow/sgetsgent_r.c @@ -61,7 +61,10 @@ __sgetsgent_r (const char *string, struct sgrp *resbuf, char *buffer, buffer[buflen - 1] = '\0'; sp = strncpy (buffer, string, buflen); if (buffer[buflen - 1] != '\0') - return ERANGE; + { + __set_errno (ERANGE); + return ERANGE; + } } else sp = (char *) string; |