recipes: x-apps/emacs: Enable emacs again, trying the -no-pie option
[dragora.git] / patches / kbd / kbd-2.4.0-covscan-fixes.patch
blobc7ddf27b92a59fe47ce22d9475dfc20e563d34d1
1 diff -up kbd-2.4.0/src/libkfont/psffontop.c.orig kbd-2.4.0/src/libkfont/psffontop.c
2 --- kbd-2.4.0/src/libkfont/psffontop.c.orig 2020-04-27 17:53:01.000000000 +0200
3 +++ kbd-2.4.0/src/libkfont/psffontop.c 2021-04-27 09:59:14.170153676 +0200
4 @@ -235,6 +235,7 @@ kfont_read_psffont(struct kfont_context
6 if (psfhdr->mode > PSF1_MAXMODE) {
7 KFONT_ERR(ctx, _("Unsupported psf file mode (%d)"), psfhdr->mode);
8 + free(psfhdr);
9 return -EX_DATAERR;
11 fontlen = ((psfhdr->mode & PSF1_MODE512) ? 512 : 256);
12 @@ -251,6 +252,7 @@ kfont_read_psffont(struct kfont_context
14 if (psfhdr.version > PSF2_MAXVERSION) {
15 KFONT_ERR(ctx, _("Unsupported psf version (%d)"), psfhdr.version);
16 + free(inputbuf);
17 return -EX_DATAERR;
19 fontlen = assemble_uint32((unsigned char *)&psfhdr.length);
20 @@ -260,16 +262,20 @@ kfont_read_psffont(struct kfont_context
21 ftoffset = assemble_uint32((unsigned char *)&psfhdr.headersize);
22 fontwidth = assemble_uint32((unsigned char *)&psfhdr.width);
23 utf8 = 1;
24 - } else
25 + } else {
26 + free(inputbuf);
27 return -EX_DATAERR; /* not psf */
28 + }
30 /* tests required - we divide by these */
31 if (fontlen == 0) {
32 KFONT_ERR(ctx, _("zero input font length?"));
33 + free(inputbuf);
34 return -EX_DATAERR;
36 if (charsize == 0) {
37 KFONT_ERR(ctx, _("zero input character size?"));
38 + free(inputbuf);
39 return -EX_DATAERR;
42 @@ -277,6 +283,7 @@ kfont_read_psffont(struct kfont_context
44 if (i > inputlth || (!hastable && i != inputlth)) {
45 KFONT_ERR(ctx, _("Input file: bad input length (%d)"), inputlth);
46 + free(inputbuf);
47 return -EX_DATAERR;