diff options
Diffstat (limited to 'network/felinks/patches/0006-gopher-indexes_nocr.patch')
-rw-r--r-- | network/felinks/patches/0006-gopher-indexes_nocr.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/network/felinks/patches/0006-gopher-indexes_nocr.patch b/network/felinks/patches/0006-gopher-indexes_nocr.patch new file mode 100644 index 000000000000..9e4a441db66c --- /dev/null +++ b/network/felinks/patches/0006-gopher-indexes_nocr.patch @@ -0,0 +1,19 @@ +####################################################################### +# Fix index listings with only LF and no CRs. +# dave@slackbuilds.org +####################################################################### +diff -Naur '--exclude=.git' bb/src/protocol/gopher/gopher.c cc/src/protocol/gopher/gopher.c +--- bb/src/protocol/gopher/gopher.c 2020-01-14 06:42:11.030536586 +0000 ++++ cc/src/protocol/gopher/gopher.c 2020-01-14 06:42:26.710000886 +0000 +@@ -757,6 +757,11 @@ + switch (gopher->entity->type) { + case GOPHER_DIRECTORY: + case GOPHER_INDEX: ++ /* Lines with no carriage returns */ ++ if (strchr(rb->data, ASCII_CR) == NULL) { ++ strncat(rb->data, "\r\n", 2); ++ rb->length += 3; ++ } + state = read_gopher_directory_data(conn, rb); + break; + |