logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0010-Avoid-pointer-arithmetic-on-void.patch (654B)


  1. From 79f62821ec98aca7cdd25a1bba7a8bdea59272e5 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Tue, 2 Jul 2019 19:52:43 -0700
  4. Subject: [PATCH] Avoid pointer arithmetic on `void *`
  5. ---
  6. sshfs.c | 2 +-
  7. 1 file changed, 1 insertion(+), 1 deletion(-)
  8. diff --git a/sshfs.c b/sshfs.c
  9. index fd7bccb..133b248 100644
  10. --- a/sshfs.c
  11. +++ b/sshfs.c
  12. @@ -1182,7 +1182,7 @@ static int do_write(struct iovec *iov, size_t count)
  13. do {
  14. if ((unsigned) res < iov->iov_len) {
  15. iov->iov_len -= res;
  16. - iov->iov_base += res;
  17. + iov->iov_base = (char *) iov->iov_base + res;
  18. break;
  19. } else {
  20. res -= iov->iov_len;
  21. --
  22. 2.24.0