legionus / kbd

Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git
https://kbd-project.org
Other
85 stars 40 forks source link

libkfont: Initialize kfont_context->options #68

Closed Vogtinator closed 2 years ago

Vogtinator commented 2 years ago

kfont_init did not set the options member, so it had essentially random content. This made setfont behave weirdly.

Switch to calloc for good measure to avoid issues like this.

Signed-off-by: Fabian Vogt fvogt@suse.de

Initially found by openQA which randomly saw huge text: https://openqa.opensuse.org/tests/2087792#step/consoletest_setup/52

Can be reproduced reliably with MALLOC_PERTURB_=69 setfont eurlatgr.

legionus commented 2 years ago

Oops! good catch! thanks!