]> git.eshelyaron.com Git - emacs.git/commitdiff
src/alloc.c: Fix incorrect pointer arithmetic.
authorVibhav Pant <vibhavp@gmail.com>
Sun, 4 Dec 2022 16:54:07 +0000 (22:24 +0530)
committerVibhav Pant <vibhavp@gmail.com>
Sun, 4 Dec 2022 16:54:07 +0000 (22:24 +0530)
* src/alloc.c (live_float_holding): Use parenthesis around the
pointer arithmetic expression to untag 'cp' correctly.

src/alloc.c

index 31108837e5ad8e8c50628757079eb74d0f5a63e9..6b8a4cdcc028d5fc58de903e8a93abbc5709e783 100644 (file)
@@ -5104,7 +5104,7 @@ live_float_holding (struct mem_node *m, void *p)
          && (b != float_block
              || offset / sizeof b->floats[0] < float_block_index))
        {
-         struct Lisp_Float *f = (struct Lisp_Float *) cp - off;
+         struct Lisp_Float *f = (struct Lisp_Float *) (cp - off);
 #if GC_ASAN_POISON_OBJECTS
          if (__asan_region_is_poisoned (f, sizeof (*f)))
            return NULL;