aboutsummaryrefslogtreecommitdiff
path: root/src/libdraw
AgeCommit message (Collapse)AuthorFilesLines
2017-04-08libdraw: replace hand-rolled realloc, preventing buffer overflow.Ray Lai1-3/+1
The original buffer is f->nsubf*sizeof *subf bytes (oldsize) large. Once it's full, a new buffer of (f->nsubf+DSUBF)*sizeof *subf (newsize) is mallocated. Unfortunately memmove() reads (newsize) bytes from the original (oldsize) buffer, causing a buffer overflow. By switching to realloc(), we don't need to do buffer size calculation, memmoving, and freeing of the original buffer. Change-Id: Ibf85bc06abe1c8275b11acb1d7d346a14291d2cd Reviewed-on: https://plan9port-review.googlesource.com/1520 Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2017-01-069term, win: work around bsd linker nonsenseRuss Cox1-0/+5
Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-08-27fontsrv: use 64 chars per subfont instead of 256Russ Cox1-1/+1
Makes loading faster, and makes larger sizes not too wide. Change-Id: I076c83fdb9577c1e596de45558f38ea93e3a2a31 Reviewed-on: https://plan9port-review.googlesource.com/1360 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-05-15libdraw, acme: fix acme segfault triggered passing an invalid fontGleydson Soares1-0/+2
acme -f nosuchfont Change-Id: Iaa727db02b43e63082130796ec97c0efb7fe2b19 Reviewed-on: https://plan9port-review.googlesource.com/1220 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: refine hidpi font selectionRuss Cox3-1/+43
Change-Id: Id1e6a2630713024a1925ad1341bb9c846f82e93e Reviewed-on: https://plan9port-review.googlesource.com/1171 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: autoscale fonts when moving between low and high dpi screensRuss Cox7-27/+212
Change-Id: I6093955b222db89dfe437fb723593b173d888d01 Reviewed-on: https://plan9port-review.googlesource.com/1170 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: add 2*font syntax for scaled fontsRuss Cox6-4/+75
An experiment. Change-Id: I40660a211b8372701597d80f7e86917e94cccbaa Reviewed-on: https://plan9port-review.googlesource.com/1161 Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02libdraw, libframe, acme: fix, guard against inverted range in textsetselectRuss Cox1-0/+3
Credit to Roi Martin <jroi.martin@gmail.com> for noticing that libdraw was being passed a negative string length and for finding the sequence of keystrokes that make acme do it reproducibly. Change-Id: If3f3d04a25c506175f740d3e887d5d83b5cd1bfe Reviewed-on: https://plan9port-review.googlesource.com/1092 Reviewed-by: Russ Cox <rsc@swtch.com>
2012-11-25libdraw: add scalesizeRuss Cox1-0/+7
R=rsc http://codereview.appspot.com/6855092
2012-11-25devdraw, libdraw: add display->dpiRuss Cox1-0/+9
Fixed at 100 right now, but the plan is to make it accurate and then use it. R=rsc http://codereview.appspot.com/6856091
2012-09-17libdraw: add visibleclicks modeRuss Cox3-2/+54
R=rsc http://codereview.appspot.com/6501137
2010-01-28libdraw: allow 32-bit RunesRuss Cox1-1/+1
R=, rsc CC= http://codereview.appspot.com/196054
2009-07-14mergeRuss Cox1-2/+6
2009-07-08mergeRuss Cox3-6/+63
2009-04-30mergeRuss Cox1-0/+9
2008-12-03libdraw: add borderopJeff Sickel1-9/+15
2008-07-01libdraw: do not let devdraw fork, for OS XRuss Cox1-1/+5
2008-06-30libdraw: die if display doesRuss Cox2-3/+3
2008-01-10libdraw: fix spinning event loop (David Bulkow)Russ Cox1-6/+6
2006-11-05block instead of chewing cpu in eread (Lu Xuxiao)rsc1-1/+1
2006-11-04In non-blocking recv functions in libmux and libdraw,rsc2-15/+31
distinguish between "cannot receive without blocking" and "EOF on connection". In libmux, do not elect async guys muxers, so that synchronous RPC calls run in the main event loop (e.g., in eresized) do not get stuck. Fixes problem reported by Lu Xuxiao, namely that jpg etc. would spin at 100% cpu usage.
2006-07-04move USED past decls (Arvindh Tamilmani)rsc1-2/+2
2006-06-26use pinrsc1-1/+27
2006-06-25add iprintrsc2-0/+15
2006-06-25gonersc2-180/+0
2006-06-25eventrsc6-1904/+272
2006-06-25byersc1-43/+0
2006-06-25newrsc4-0/+742
2006-06-25byersc75-11641/+226
2006-05-23fix _screen leakrsc2-15/+8
2006-05-21changes from plan 9rsc2-15/+11
2006-05-20do RFNOTEG in initdraw (Anselm Garbe)rsc1-0/+1
2006-04-21shut up gccrsc1-0/+3
2006-04-04no checksnarfrsc1-11/+0
2006-04-01Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.rsc13-47/+47
2006-03-31fix alpha oopsrsc2-15/+17
2006-03-12regenerate latin1 tablesrsc1-101/+101
2006-03-10jpg fix? (erik quanstrom)rsc1-0/+1
2006-03-10synergy (paul lalonde)rsc1-2/+6
2006-02-28more itrans changesrsc1-12/+1
2006-02-28allow fallback to x11rsc1-4/+23
2006-02-28use pasteboardrsc1-5/+138
2006-01-29return 0rsc1-1/+1
2006-01-28do not die in freeimage(0) when screen==0rsc1-1/+2
2006-01-27nowsys fixes (Lou Kamenov)rsc2-2/+23
2005-12-29do not trust gcc-4.0 to do nrv optimization. (taj khattra)rsc1-25/+22
2005-12-29avoid nil freeimagersc1-2/+4
2005-11-16oopsrsc1-2/+2
2005-11-12x11, used, etc.rsc2-6/+12
2005-11-07debugging helprsc3-3/+8