Hi,
In release version 0.12.4,(also in the latest commit 4c210bba) , dwg2SVG 0.12.4.4317

There is an infinite loop in functopn output_BLOCK_HEADER() in dwg2SVG.c
Occur in the while loop at line 804 

```c
//dwg2SVG.c
802	  while (obj)
803	    {
804	      num += output_object (obj);
805	      obj = get_next_owned_entity (ref->obj, obj);
806	    }
```
Root cause is in `dwg_next_entity`.

If function `dwg_ref_object_silent ` call `return dwg_ref_object_silent (obj->parent, next);` 

and then  `obj = bj->tio.entity->next_entity->obj`, the loop happened


```c 
//dwg.c
1803 dwg_next_entity (const Dwg_Object *restrict obj)
1092	    {
1093	      if (!obj->tio.entity) // decoding error
1094	        goto next_obj;
1095	      next = obj->tio.entity->next_entity;
1096	      if (next && next->absolute_ref)
1097	        return dwg_ref_object_silent (obj->parent, next);
1098	      else
1099	        goto next_obj;
1100	    }

$57 = (const Dwg_Object * restrict) 0x7fffeeb3ea88
gef➤  p obj->tio.entity
$58 = (Dwg_Object_Entity *) 0x6120000031c0
gef➤  p obj->tio.entity->next_entity
$59 = (BITCODE_H) 0x6040000073d0
gef➤  p obj->tio.entity->next_entity->obj
$60 = (struct _dwg_object *) 0x7fffeeb3ea88
```

**reproduce**

./configure --enable-release
make
./bin/dwg2SVG [poc]
[zipped poc](https://github.com/LibreDWG/libredwg/files/6582616/infinite_loop_dwg_next_entity.zip)



Infinite loop in functopn output_BLOCK_HEADER() in dwg2SVG.c
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : Infinite loop in functopn output_BLOCK_HEADER() in dwg2SVG.c
Issue date:

--- start body ---
Hi,
In release version 0.12.4,(also in the latest commit 4c210bba) , dwg2SVG 0.12.4.4317

There is an infinite loop in functopn output_BLOCK_HEADER() in dwg2SVG.c
Occur in the while loop at line 804 

```c
//dwg2SVG.c
802	  while (obj)
803	    {
804	      num += output_object (obj);
805	      obj = get_next_owned_entity (ref->obj, obj);
806	    }
```
Root cause is in `dwg_next_entity`.

If function `dwg_ref_object_silent ` call `return dwg_ref_object_silent (obj->parent, next);` 

and then  `obj = bj->tio.entity->next_entity->obj`, the loop happened


```c 
//dwg.c
1803 dwg_next_entity (const Dwg_Object *restrict obj)
1092	    {
1093	      if (!obj->tio.entity) // decoding error
1094	        goto next_obj;
1095	      next = obj->tio.entity->next_entity;
1096	      if (next && next->absolute_ref)
1097	        return dwg_ref_object_silent (obj->parent, next);
1098	      else
1099	        goto next_obj;
1100	    }

$57 = (const Dwg_Object * restrict) 0x7fffeeb3ea88
gef➤  p obj->tio.entity
$58 = (Dwg_Object_Entity *) 0x6120000031c0
gef➤  p obj->tio.entity->next_entity
$59 = (BITCODE_H) 0x6040000073d0
gef➤  p obj->tio.entity->next_entity->obj
$60 = (struct _dwg_object *) 0x7fffeeb3ea88
```

**reproduce**

./configure --enable-release
make
./bin/dwg2SVG [poc]
[zipped poc](https://github.com/LibreDWG/libredwg/files/6582616/infinite_loop_dwg_next_entity.zip)



--- end body ---
