Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/acme-fontnames/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


This patch deletes the line

	free(fontnames[fix]);

from /sys/src/cmd/acme/acme.c:/^rfget.

The strings fontnames[i] do not necessarily come  from malloc:
Initially, they are statically allocated.

Other code that sets fontnames[i] does not free first; for example

	/sys/src/cmd/acme/acme.c:/^threadmain

	/sys/src/cmd/acme/rows.c:/^rowloadfonts

The following seems to crash acme reliably (and does not with this
patch):

	Run it like /386/bin/acme
	to avoid any Load or command-line
	changes to fontnames.

	Put the text
		Font var /lib/font/bit/lucidasans/unicode.6.font
	in a window (not a tag).

	Execute the text with the middle button.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.