char as_shape = 0;
if(!type3) as_shape=1;
if(glyphnr>256-32) as_shape=1;
- gfxmatrix_dump(matrix, stdout, "");
if(fabs(matrix->m00 + matrix->m11) > 0.01) as_shape=1;
if(fabs(fabs(matrix->m01) + fabs(matrix->m10)) > 0.01) as_shape=1;
+ if(fabs(matrix->m00) < 0.01) as_shape=1;
if(as_shape) {
gfxline_t*line2 = gfxline_clone(glyph->line);
static boolean tag_fill_input_buffer(struct jpeg_decompress_struct *cinfo)
{
TAG *tag = (TAG *) cinfo->client_data;
- if (tag->data[tag->pos + 0] == 0xff &&
+ if (tag->pos + 4 <= tag->len &&
+ tag->data[tag->pos + 0] == 0xff &&
tag->data[tag->pos + 1] == 0xd9 &&
tag->data[tag->pos + 2] == 0xff &&
tag->data[tag->pos + 3] == 0xd8) {
+#include <stdlib.h>
#include <assert.h>
#include "../gfxdevice.h"
#include "../gfxsource.h"
return swf_doc;
}
+static void swf_destroy(gfxsource_t*src)
+{
+ memset(src, 0, sizeof(*src));
+ free(src);
+}
+
+
gfxsource_t*gfxsource_swf_create()
{
gfxsource_t*src = (gfxsource_t*)malloc(sizeof(gfxsource_t));
memset(src, 0, sizeof(gfxsource_t));
src->set_parameter = swf_set_parameter;
src->open = swf_open;
+ src->destroy = swf_destroy;
return src;
}