[hackers] [sent] fix another index overflow issue || Markus Teich
commit b1cb3bbc2085bc30e0a456d02e7eb68d5665a5b2
Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
AuthorDate: Tue Nov 17 00:23:51 2015 +0100
Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
CommitDate: Tue Nov 17 00:23:51 2015 +0100
fix another index overflow issue
diff --git a/sent.c b/sent.c
index 6fd288b..5e47815 100644
--- a/sent.c
+++ b/sent.c
_AT_@ -326,7 +326,8 @@ void getfontsize(Slide *s, unsigned int *width, unsigned int *height)
for (j = NUMFONTSCALES - 1; j >= 0; j--)
if (fonts[j]->h * lfac <= xw.uh)
break;
- drw_setfontset(d, fonts[++j]);
+ LIMIT(j, 0, NUMFONTSCALES - 1);
+ drw_setfontset(d, fonts[j]);
/* fit width */
*width = 0;
Received on Tue Nov 17 2015 - 00:21:41 CET
This archive was generated by hypermail 2.3.0
: Tue Nov 17 2015 - 00:24:15 CET