elliotchance / elliotchance/CollectionFactory

Passing a single "\r\n" pair crashes the socket

Open
#26 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
41
Forks
8
PR merge metrics
No merged PRs in 30d

Description

https://github.com/elliotchance/CollectionFactory/blob/d146492e71177e981d94c20d03692ee40e6780dd/CollectionFactory/CollectionFactory.m#L11

When NOT using CRLF as a readDelimiter, passing a single "\r\n" pair to the socket passes this test (i.e. != nil and .length == 2), but then gets trimmed off at L16/L17, resulting in an empty string @L17, resulting in an empty array @L22, causing L36 to fault.

FIX: whitespace should be trimmed (i.e. L16/L17) BEFORE this sanity check at L11.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.