aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2017-01-02 18:27:35 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2017-01-02 18:27:35 +0000
commitfa812237434edee9745e7cf6e9ef4481cf2b5a8c (patch)
tree42642967001a18a8ada00003b1b6014157bf72dc /usr.bin/patch/patch.c
parent4f548c1916e86995b61b678743c91d689bba8581 (diff)
Notes
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