summaryrefslogtreecommitdiff
path: root/sys/src/cmd/kbmap.c
AgeCommit message (Collapse)Author
2020-12-27kbmap: avoid division by zero when window becomes too smallcinap_lenrek
2014-12-13various cmds: replace magic numbers with Kdel/Keof, etcftrvxmtrx
2014-12-11kbmap: fix sprint() buffer overflow (thanks silasm)cinap_lenrek
A buffer can be overflowed in the init function of kbmap.c by using a filename of more than 112 characters. sample output: % cd /sys/lib/kbmap % touch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa % kbmap kbmap 1974: suicide: sys: trap: fault write addr=0xa6a96510 pc=0x000011df offending code is most likely the call to sprint in the init function of /sys/src/cmd/kbmap.c, which in this case writes /sys/lib/kbmap/$file to a 128-bit buffer. I'm willing to submit a patch for this myself along with a few minor improvements/fixes to kbmap if I can figure out the nuances of doing so. --silasm
2011-12-10handle initdraw errorscinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen