Skip to content

Conversation

@dmitry-sles-novikov
Copy link

No description provided.

@upa
Copy link
Owner

upa commented Jan 30, 2026

plz describe the change.

@dmitry-sles-novikov
Copy link
Author

dmitry-sles-novikov commented Jan 31, 2026

You double-check o->buf_sz for 0, but you don't check for a negative value:

if (o->buf_sz == 0)
...
else if (o->buf_sz == 0) 

This options used to allocate a buffer and it would be good idea to check it for negative values =)

static int copy_chunk_r2l(struct chunk *c, sftp_file sf, int fd, int nr_ahead, int buf_sz, struct bwlimit *bw, size_t *counter)
{
    ....
    char buf[buf_sz];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants