Download tasks/csa159/pair_138328/patch.diff from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/csa159/pair_138328/patch.diff
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/csa159/pair_138328/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/csa159/pair_138328/patch.diff
555 Bytes
| diff --git a/src/misc.c b/src/misc.c | |
| index 8d80456c..76644a3c 100644 | |
| --- a/src/misc.c | |
| +++ b/src/misc.c | |
| int _libssh2_get_bignum_bytes(struct string_buf *buf, unsigned char **outbuf) | |
| int _libssh2_check_length(struct string_buf *buf, size_t len) | |
| { | |
| - if(len > buf->len) | |
| - return 0; | |
| - | |
| - return ((int)(buf->dataptr - buf->data) <= (int)(buf->len - len)) ? 1 : 0; | |
| + unsigned char *endp = &buf->data[buf->len]; | |
| + size_t left = endp - buf->dataptr; | |
| + return ((len <= left) && (left <= buf->len)); | |
| } | |
| /* Wrappers */ |