wok rev 21821

syslinux/kbd: check kbd malloc pointer (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 25 12:03:28 2019 +0200 (2019-08-25)
parents f063a9bbc7f4
children e93e6b4d565f
files syslinux/stuff/extra/md5sum.c
line diff
     1.1 --- a/syslinux/stuff/extra/md5sum.c	Sun Aug 25 11:41:26 2019 +0200
     1.2 +++ b/syslinux/stuff/extra/md5sum.c	Sun Aug 25 12:03:28 2019 +0200
     1.3 @@ -626,10 +626,10 @@
     1.4  	loadfile(kbdfile, (void **) &kbdmap, &map_size))
     1.5      	goto kbdmap_error;
     1.6      if (* (short *) kbdmap == 0x005D) {
     1.7 -	void *heap = malloc(2*(1846 + (768 << (3 + 0))) + 16);
     1.8  	void *p = malloc(map_size = * (long *) (kbdmap + 5));
     1.9  
    1.10  	if (p) {
    1.11 +		void *heap = malloc(2*(1846 + (768 << (3 + 0))) + 16);
    1.12  		unlzma(kbdmap, p, heap);
    1.13  		free(heap);
    1.14  		free(kbdmap);