aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index 1bdbcfb5b84b..24e09ed304ad 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -749,10 +749,10 @@ rej_line(int ch, LINENUM i)
size_t len;
const char *line = pfetch(i);
- len = strnlen(line, USHRT_MAX);
+ len = strlen(line);
fprintf(rejfp, "%c%s", ch, line);
- if (len == 0 || line[len-1] != '\n') {
+ if (len == 0 || line[len - 1] != '\n') {
if (len >= USHRT_MAX)
fprintf(rejfp, "\n\\ Line too long\n");
else