Building 0ad71990 on Ubuntu 23.04 with GCC 12.3.0 fails:

```
escape.c: In function ‘htmlescape’:
escape.c:41:25: error: pointer ‘dest’ used after ‘realloc’ [-Werror=use-after-free]
   41 |       const int off = d - dest;
      |                       ~~^~~~~~
escape.c:45:25: note: call to ‘realloc’ here
   45 |           dest = (char*)realloc (dest, len);
      |                         ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Please let me know what other information I should provide to help you figure this out.
realloc UAF (gcc 12)
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : realloc UAF (gcc 12)
Issue date:

--- start body ---
Building 0ad71990 on Ubuntu 23.04 with GCC 12.3.0 fails:

```
escape.c: In function ‘htmlescape’:
escape.c:41:25: error: pointer ‘dest’ used after ‘realloc’ [-Werror=use-after-free]
   41 |       const int off = d - dest;
      |                       ~~^~~~~~
escape.c:45:25: note: call to ‘realloc’ here
   45 |           dest = (char*)realloc (dest, len);
      |                         ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Please let me know what other information I should provide to help you figure this out.
--- end body ---
