cli tool: reimplement stdin buffering in -F. #1985
Closed
Conversation
/* Check if file is "-". If so, use a callback to read OUR stdin (to | ||
|
||
/* Mime part callbacks for stdin. */ | ||
static size_t stdin_read(char *buffer, size_t size, size_t nitems, void *arg) |
} | ||
/* Shrink buffer to spare memory resources. */ | ||
if(sip->size < sip->curpos) | ||
sip->data = realloc(sip->data, (size_t) sip->size); |
bagder
Oct 12, 2017
Member
Even shrinking can fail so this return code must be checked and bail out if you fail.
Even shrinking can fail so this return code must be checked and bail out if you fail.
Pushed: 665b3e4 |
Yes, but none of my remarks were addressed? And please use 'closes #[num]' in commit messages that close PRs (or "closes [URL]") |
oh, did I remark after it was merged perhaps? I think you need to give us slightly more time to review... |
Yes, I think so: I've just received the mails. Thanks for your review and I'll take your remarks in consideration. I was not expecting it but just wanted to have checks on cross-platforms :-) |
monnerat
added a commit
that referenced
this pull request
Oct 12, 2017
Fixed: 5650905 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Dummy PR to check new code on APPVeyor/Travis CI