Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 139338
Collapse All | Expand All

(-)work/gif2png-2.5.1/gif2png.c.orig (-4 / +9 lines)
Lines 135-141 Link Here
135
    unsigned long hist_maxvalue;
135
    unsigned long hist_maxvalue;
136
    int passcount;
136
    int passcount;
137
    int errtype, errorcount = 0;
137
    int errtype, errorcount = 0;
138
    png_text software;
138
    png_text comment, software;
139
139
140
    /* these volatile declarations prevent gcc warnings ("variable might be
140
    /* these volatile declarations prevent gcc warnings ("variable might be
141
     *  clobbered by `longjmp' or `vfork'") */
141
     *  clobbered by `longjmp' or `vfork'") */
Lines 517-526 Link Here
517
	    j = s->size;
517
	    j = s->size;
518
	    if (j > 0 && data[j-1] == '\0')  /* some apps include a NULL in GIF comment */
518
	    if (j > 0 && data[j-1] == '\0')  /* some apps include a NULL in GIF comment */
519
		--j;
519
		--j;
520
	    if (j<500) {
520
      if (j<1000) {
521
		png_write_tEXt(png_ptr, "Comment", (png_charp)data, j);
521
        comment.compression = PNG_TEXT_COMPRESSION_NONE;
522
	    } else {
522
	    } else {
523
		png_write_zTXt(png_ptr, "Comment", (png_charp)data, j, 0);
523
        comment.compression = PNG_TEXT_COMPRESSION_zTXt;
524
        comment.key = "Comment";
525
        comment.text = data;
526
        comment.text_length = j;
527
528
        png_set_text(png_ptr, info_ptr, &comment, 1);
524
	    }
529
	    }
525
	    break;
530
	    break;
526
531

Return to bug 139338