Skip to content

Failed test bash -c "chmod -R 777 .; rm -rf /tmp/tmpout.tif; tools/gif2tiff .dpp/crash.gif /tmp/tmpout.tif" #601

@github-actions

Description

@github-actions

This issue is generated by Vulcan for commit: 0cfe37f

Coverage: 17.44 percent

Click here for a list of target sources

tools/tiff2rgba.c

tools/gif2tiff.c

libtiff/tif_pixarlog.c

libtiff/tif_version.c

libtiff/tif_dirinfo.c

tools/ppm2tiff.c

tools/tiffset.c

libtiff/tif_ojpeg.c

tools/tiffmedian.c

tools/fax2tiff.c

tools/tiffdither.c

libtiff/tif_read.c

tools/tiffcp.c

contrib/dbs/tiff-palette.c

tools/tiff2bw.c

libtiff/tif_lzw.c

libtiff/tif_error.c

tools/bmp2tiff.c

libtiff/tif_fax3.c

libtiff/tif_print.c

contrib/dbs/tiff-bi.c

tools/rgb2ycbcr.c

contrib/dbs/tiff-grayscale.c

libtiff/tif_close.c

tools/tiff2pdf.c

libtiff/tif_zip.c

libtiff/tif_dir.c

libtiff/tif_thunder.c

libtiff/tif_extension.c

contrib/addtiffo/tif_ovrcache.c

libtiff/tif_dirread.c

libtiff/tif_jpeg.c

contrib/dbs/tiff-rgb.c

contrib/addtiffo/tif_overview.c

libtiff/tif_codec.c

libtiff/mkg3states.c

tools/ras2tiff.c

libtiff/tif_strip.c

libtiff/tif_getimage.c

libtiff/tif_next.c

libtiff/tif_warning.c

libtiff/tif_color.c

tools/tiff2ps.c

tools/tiffinfo.c

libtiff/tif_open.c

tools/pal2rgb.c

contrib/iptcutil/iptcutil.c

libtiff/tif_dirwrite.c

libtiff/tif_dumpmode.c

libtiff/tif_flush.c

libtiff/tif_aux.c

tools/tiffdump.c

tools/thumbnail.c

tools/fax2ps.c

libtiff/tif_predict.c

port/dummy.c

libtiff/tif_swab.c

libtiff/tif_packbits.c

libtiff/tif_write.c

libtiff/tif_tile.c

tools/tiffsplit.c

libtiff/tif_luv.c

tools/tiffcmp.c

libtiff/tif_compress.c

libtiff/tif_unix.c

tools/raw2tiff.c

tools/tiffcrop.c

contrib/addtiffo/addtiffo.c

There is(are) 1/40 failed test(s)

Click here for the failed test commands
  1. [FAILED] bash -c "chmod -R 777 .; rm -rf /tmp/tmpout.tif; tools/gif2tiff .dpp/crash.gif /tmp/tmpout.tif"

Clicking on the link, you take the page with code highlighted.
There are a lot of the suspicious code snippets and show 5 among them.
Recommend that split your tests or adde new tests.

Click here for FL information

Suspicious score: 1.00

makegamtab(float gam)


Suspicious score: 1.00

for(i=0; i<256; i++)


Suspicious score: 1.00

gamtab[i] = (unsigned short) (IMAX*pow(i/255.0,gam)+0.5);


Suspicious score: 1.00


Suspicious score: 1.00

main(int argc, char* argv[])


210 patch(es) generaetd by vulcan

plausible patch diff info
--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.973961637 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(ch == 33))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.969961554 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(mode != 0))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.969961554 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(ch != 0))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.973961637 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(infile != 0))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.965961470 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(mode > 0))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.969961554 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(ch > 0))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.969961554 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(infile > 0))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.965961470 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(ch < 33))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:28.973961637 +0000
@@ -240,8 +240,8 @@
                            return (-1);
 			mode = "a";		/* subsequent images append */
                         break;
-        case '!':   if (!readextension())
-                            return (-1);
+        case '!':   if ((!readextension()) && !(1))
+    return (-1);
                         break;
             default:    fprintf(stderr, "illegal GIF block type\n");
                         return (-1);

--- __backup0	2022-12-12 01:50:07.490169642 +0000
+++ tools/gif2tiff.c	2022-12-12 02:08:29.065963563 +0000
@@ -233,18 +233,23 @@
         return (-1);
     if (!readscreen())
         return (-1);
-    while ((ch = getc(infile)) != ';' && ch != EOF) {
+    while (((ch = getc(infile)) != ';' && ch != (-1)) && !(ch == 33))
+    {
         switch (ch) {
-            case '\0':  break;  /* this kludge for non-standard files */
-            case ',':   if (!readgifimage(mode))
-                           return (-1);
-			mode = "a";		/* subsequent images append */
-                        break;
-        case '!':   if (!readextension())
-                            return (-1);
-                        break;
-            default:    fprintf(stderr, "illegal GIF block type\n");
-                        return (-1);
+          case '\x00':
+            break;
+          case ',':
+            if (!readgifimage(mode))
+                return (-1);
+            mode = "a";
+            break;
+          case '!':
+            if (!readextension())
+                return (-1);
+            break;
+          default:
+            fprintf(stderr, "illegal GIF block type\n");
+            return (-1);
         }
     }
     return (0);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions