...G...... [ZBX-8031] fixed allocating of some buffers; major issues