Fixed defects

List of Defects

Error: CPPCHECK_WARNING: [#def1]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/gdk-pixbuf-buffer-queue.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ani.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-bmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-icns.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def5]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def6]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:653:37: warning[core.NullDereference]: Array access (via field 'LineBuf') results in a null pointer dereference
#  651|           while (X < context->Header.width) {
#  652|                   /* BGRA */
#  653|->                 Pixels[X * 4 + 0] = context->LineBuf[X * 4 + 2];
#  654|                   Pixels[X * 4 + 1] = context->LineBuf[X * 4 + 1];
#  655|                   Pixels[X * 4 + 2] = context->LineBuf[X * 4 + 0];

Error: CLANG_WARNING: [#def7]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:675:23: warning[core.NullDereference]: Array access (via field 'LineBuf') results in a null pointer dereference
#  673|   			  rowstride * context->Lines);
#  674|   	while (X < context->Header.width) {
#  675|-> 		Pixels[X * 4 + 0] = context->LineBuf[X * 3 + 2];
#  676|   		Pixels[X * 4 + 1] = context->LineBuf[X * 3 + 1];
#  677|   		Pixels[X * 4 + 2] = context->LineBuf[X * 3 + 0];

Error: CLANG_WARNING: [#def8]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:704:27: warning[core.NullDereference]: Array access (from variable 'src') results in a null pointer dereference
#  702|                   int v, r, g, b;
#  703|   
#  704|->                 v = (int) src[0] | ((int) src[1] << 8);
#  705|                   src += 2;
#  706|   

Error: CLANG_WARNING: [#def9]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:739:30: warning[core.NullDereference]: Array access (via field 'LineBuf') results in a null pointer dereference
#  737|   		/* The joys of having a BGR byteorder */
#  738|   		Pixels[X * 4 + 0] =
#  739|-> 		    context->HeaderBuf[4 * context->LineBuf[X] + INFOHEADER_SIZE + 2 + context->DIBoffset];
#  740|   		Pixels[X * 4 + 1] =
#  741|   		    context->HeaderBuf[4 * context->LineBuf[X] + INFOHEADER_SIZE + 1 +context->DIBoffset];

Error: CLANG_WARNING: [#def10]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:765:9: warning[core.NullDereference]: Array access (via field 'LineBuf') results in a null pointer dereference
#  763|   		guchar Pix;
#  764|   		
#  765|-> 		Pix = context->LineBuf[X/2];
#  766|   
#  767|   		Pixels[X * 4 + 0] =

Error: CLANG_WARNING: [#def11]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:806:9: warning[core.NullDereference]: Array access (via field 'LineBuf') results in a null pointer dereference
#  804|   		int Bit;
#  805|   
#  806|-> 		Bit = (context->LineBuf[X / 8]) >> (7 - (X & 7));
#  807|   		Bit = Bit & 1;
#  808|   		/* The joys of having a BGR byteorder */

Error: CLANG_WARNING: [#def12]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:837:9: warning[core.NullDereference]: Array access (via field 'LineBuf') results in a null pointer dereference
#  835|   		int Bit;
#  836|   
#  837|-> 		Bit = (context->LineBuf[X / 8]) >> (7 - (X & 7));
#  838|   		Bit = Bit & 1;
#  839|   		/* The joys of having a BGR byteorder */

Error: CLANG_WARNING: [#def13]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-ico.c:1327:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'icon'
# 1325|   				if (!ascii_strtoll (*viter, 1, 32,
# 1326|   				                    &out, error))
# 1327|-> 					return FALSE;
# 1328|   				icon->depth = out;
# 1329|   			}

Error: CPPCHECK_WARNING: [#def14]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-pnm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-qtif.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-tga.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-xbm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def18]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-xbm.c:358:9: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  356|   			guchar channel;
#  357|   			if (bits == 0) {
#  358|-> 				reg = *ptr++;
#  359|   				bits = 8;
#  360|   			}

Error: CPPCHECK_WARNING: [#def19]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-xpm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-xpm.c: scope_hint: In function ‘pixbuf_create_from_xpm’
gdk-pixbuf2-2.42.10-build/gdk-pixbuf-2.42.10/gdk-pixbuf/io-xpm.c:624:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘color’
#  622|   				color = fallbackcolor;
#  623|   
#  624|-> 			*pixtmp++ = color->red >> 8;
#  625|   			*pixtmp++ = color->green >> 8;
#  626|   			*pixtmp++ = color->blue >> 8;

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-216.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namegdk-pixbuf2-2.42.12-1.fc41
diffbase-store-results-to/tmp/tmpy_gn8egf/gdk-pixbuf2-2.42.12-1.fc41.tar.xz
diffbase-time-created2024-07-03 12:46:31
diffbase-time-finished2024-07-03 12:48:22
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpy_gn8egf/gdk-pixbuf2-2.42.12-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpy_gn8egf/gdk-pixbuf2-2.42.12-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-216.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namegdk-pixbuf2-2.42.10-8.fc40
store-results-to/tmp/tmpdd9vnvh2/gdk-pixbuf2-2.42.10-8.fc40.tar.xz
time-created2024-07-03 12:43:28
time-finished2024-07-03 12:45:57
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpdd9vnvh2/gdk-pixbuf2-2.42.10-8.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpdd9vnvh2/gdk-pixbuf2-2.42.10-8.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9