This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#4955 - convbdf segfaults on very large fonts
Attached to Project:
Rockbox
Opened by Anonymous Submitter - Thursday, 30 March 2006, 15:57 GMT+2
Last edited by Daniel Stenberg (bagder) - Tuesday, 31 July 2007, 11:43 GMT+2
Opened by Anonymous Submitter - Thursday, 30 March 2006, 15:57 GMT+2
Last edited by Daniel Stenberg (bagder) - Tuesday, 31 July 2007, 11:43 GMT+2
|
DetailsWhen running convbdf on large files, it segfaults. By littering the source with printfs, I've narrowed it down to that the segfault happens in writestr(), and it's being called from line 1071 (writestr(ofp, (char *)bytemap, size);), whatever that means.
The following is an example of a file that causes convbdf to segfault: http://webcvs.freedesktop.org/*checkout*/xorg/xc/fonts/bdf/100dpi/UTB___24.bdf |
This task depends upon
Closed by Daniel Stenberg (bagder)
Tuesday, 31 July 2007, 11:43 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in SVN right now
Tuesday, 31 July 2007, 11:43 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in SVN right now
Ah, I just noticed something curious. The file is 65536 bytes large, I'm guessing that might mean something?
This one still causes a segfault, even with gcc 3.3.6:
http://webcvs.freedesktop.org/*checkout*/xorg/xc/fonts/bdf/100dpi/luIS24.bdf
Index: convbdf.c
===================================================================
RCS file: /cvsroot/rockbox/tools/convbdf.c,v
retrieving revision 1.20
diff -u -p -r1.20 convbdf.c
--- convbdf.c 18 Apr 2006 17:24:14 -0000 1.20
+++ convbdf.c 18 Sep 2006 22:52:12 -0000
@@ -1048,7 +1048,7 @@ int gen_fnt_file(struct font* pf, char *
bitmap_t* bits;
int width = pf->width ? pf->width[i] : pf->maxwidth;
int size;
- unsigned char bytemap[256];
+ unsigned char bytemap[512];
/* Skip missing glyphs */
if (pf->offset && (pf->offset[i] == (unsigned int)-1))