Lighttable: fix 2 heap-buffer-overflow [AddressSanitizer]