diff options
author | Gleydson Soares <gsoares@gmail.com> | 2015-03-21 00:24:09 -0300 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2015-05-15 02:30:27 +0000 |
commit | 25822e8da338df2c15959bd8d347f230dc2b2d89 (patch) | |
tree | 796a25d2990217f115657cd4e100e458012b9c9d /src/libdraw | |
parent | 3aca22118d808597bc7451adc559d89460ed5a6e (diff) | |
download | plan9port-25822e8da338df2c15959bd8d347f230dc2b2d89.tar.gz plan9port-25822e8da338df2c15959bd8d347f230dc2b2d89.tar.bz2 plan9port-25822e8da338df2c15959bd8d347f230dc2b2d89.zip |
libdraw, acme: fix acme segfault triggered passing an invalid font
acme -f nosuchfont
Change-Id: Iaa727db02b43e63082130796ec97c0efb7fe2b19
Reviewed-on: https://plan9port-review.googlesource.com/1220
Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src/libdraw')
-rw-r--r-- | src/libdraw/openfont.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libdraw/openfont.c b/src/libdraw/openfont.c index f798983b..fdbc6563 100644 --- a/src/libdraw/openfont.c +++ b/src/libdraw/openfont.c @@ -221,6 +221,8 @@ openfont(Display *d, char *name) *p = '\0'; f = openfont1(d, name); + if(!f) + return nil; f->lodpi = f; f->namespec = namespec; |