Steps to reproduce:
- I tried to upgrade my little home zabbix server from 5.0.4 to 5.2.1
- The DB upgrade progressed through DBpatch_5010043
- DBpatch_5010044 never completed.
- So I started to add debug prints and eventually, I found, that a malloc() did not succeed
- So I tried to do a valgrind run and found two behind-by-1 writes. The lines will be a bit offset because of my added logging lines.
- The problematic loop:
- My quick-hack to avoid the problem (including one of the added prints):
I hope, this can be checked and potentially fixed?!