libXmu-1.2.1-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c:142:6: warning[deadcode.DeadStores]: Value stored to 'p' is never read
#  140|   	  XmuScanlineCopy(z, Z);
#  141|   	  if (p == dst->scanline && !dst->scanline)
#  142|-> 	    p = dst->scanline = z;
#  143|   	  else
#  144|   	    p->next = z;

Error: CLANG_WARNING: [#def3]
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c:209:9: warning[core.NullDereference]: Access to field 'y' results in a dereference of a null pointer (loaded from variable 'z')
#  207|       XmuDestroyArea(and);
#  208|       z = area->scanline;
#  209|->     if (z->y != y1)
#  210|         {
#  211|   	XmuScanline *q = XmuNewScanline(y1, x1, x2);

Error: CLANG_WARNING: [#def4]
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c:435:7: warning[deadcode.DeadStores]: Although the value stored to 'P' is used in the enclosing expression, the value is never actually read from 'P'
#  433|       }
#  434|     z = p = dst->scanline;
#  435|->   Z = P = src->scanline;
#  436|     top = XmuNewScanline(dst->scanline->y, 0, 0);
#  437|     XmuScanlineCopy(top, dst->scanline);

Error: CLANG_WARNING: [#def5]
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c:700:6: warning[deadcode.DeadStores]: Value stored to 'p' is never read
#  698|   	  z = XmuNewSegment(Z->x1, Z->x2);
#  699|   	  if (p == dst->segment && !dst->segment)
#  700|-> 	    p = dst->segment = z;
#  701|   	  else
#  702|   	    p->next = z;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c: scope_hint: In function 'XmuScanlineCopy.part.0'
libXmu-1.2.1-build/libXmu-1.2.1/src/Clip.c:702:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'p'
#  700|   	    p = dst->segment = z;
#  701|   	  else
#  702|-> 	    p->next = z;
#  703|   	}
#  704|         p = z;

Error: CPPCHECK_WARNING: [#def7]
libXmu-1.2.1-build/libXmu-1.2.1/src/CloseHook.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def8]
libXmu-1.2.1-build/libXmu-1.2.1/src/CloseHook.c:272:13: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'prev')
#  270|   	elist = de->next;
#  271|       } else {
#  272|-> 	prev->next = de->next;
#  273|       }
#  274|       free (de);

Error: CPPCHECK_WARNING: [#def9]
libXmu-1.2.1-build/libXmu-1.2.1/src/CrCmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def10]
libXmu-1.2.1-build/libXmu-1.2.1/src/CrCmap.c:154: warning[nullPointer]: Possible null pointer dereference: vinfo
#  152|       }
#  153|   
#  154|->     if (vinfo->class == PseudoColor || vinfo->class == DirectColor ||
#  155|   	vinfo->class == GrayScale)
#  156|   	status = readwrite_map(dpy, vinfo, colormap);

Error: CLANG_WARNING: [#def11]
libXmu-1.2.1-build/libXmu-1.2.1/src/CrCmap.c:154:9: warning[core.NullDereference]: Access to field 'class' results in a dereference of a null pointer (loaded from variable 'vinfo')
#  152|       }
#  153|   
#  154|->     if (vinfo->class == PseudoColor || vinfo->class == DirectColor ||
#  155|   	vinfo->class == GrayScale)
#  156|   	status = readwrite_map(dpy, vinfo, colormap);

Error: CLANG_WARNING: [#def12]
libXmu-1.2.1-build/libXmu-1.2.1/src/CrCmap.c:307:18: warning[core.DivideZero]: Division by zero
#  305|   	{
#  306|   	    color.pixel = n + colormap->base_pixel;
#  307|-> 	    color.red = calc(red_max, red_mult);
#  308|   	    color.green = calc(green_max, green_mult);
#  309|   	    color.blue = calc(blue_max, blue_mult);

Error: CLANG_WARNING: [#def13]
libXmu-1.2.1-build/libXmu-1.2.1/src/CrCmap.c:308:20: warning[core.DivideZero]: Division by zero
#  306|   	    color.pixel = n + colormap->base_pixel;
#  307|   	    color.red = calc(red_max, red_mult);
#  308|-> 	    color.green = calc(green_max, green_mult);
#  309|   	    color.blue = calc(blue_max, blue_mult);
#  310|   	    if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color,

Error: CLANG_WARNING: [#def14]
libXmu-1.2.1-build/libXmu-1.2.1/src/CvtStdSel.c:223:12: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  221|   	if (!XtIsWMShell(w)) return False;
#  222|   	*value = XtNewString( ((WMShellWidget) w)->wm.title );
#  223|-> 	*length = strlen(*value);
#  224|   	*type = XA_STRING;
#  225|   	*format = 8;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def15]
libXmu-1.2.1-build/libXmu-1.2.1/src/CvtStdSel.c: scope_hint: In function 'XmuConvertStandardSelection'
libXmu-1.2.1-build/libXmu-1.2.1/src/CvtStdSel.c:223:19: warning[-Wanalyzer-null-argument]: use of NULL '*value' where non-null expected
/usr/include/X11/IntrinsicP.h:51: included_from: Included from here.
libXmu-1.2.1-build/libXmu-1.2.1/src/CvtStdSel.c:39: included_from: Included from here.
<built-in>: note: argument 1 of '__builtin_strlen' must be non-null
#  221|   	if (!XtIsWMShell(w)) return False;
#  222|   	*value = XtNewString( ((WMShellWidget) w)->wm.title );
#  223|-> 	*length = strlen(*value);
#  224|   	*type = XA_STRING;
#  225|   	*format = 8;

Error: CPPCHECK_WARNING: [#def16]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-134): [#def17]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c: scope_hint: In function 'XmuPrintDefaultErrorMessage'
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c:54:24: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#   54 |     (void) fprintf(fp, mesg, event->request_code);
#      |                        ^~~~
#   52|       XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d",
#   53|   	mesg, BUFSIZ);
#   54|->     (void) fprintf(fp, mesg, event->request_code);
#   55|       if (event->request_code < 128) {
#   56|   	XmuSnprintf(number, sizeof(number), "%d", event->request_code);

Error: COMPILER_WARNING (CWE-134): [#def18]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c:74:28: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#   74 |         (void) fprintf(fp, mesg, event->minor_code);
#      |                            ^~~~
#   72|   	XGetErrorDatabaseText(dpy, mtype, "MinorCode", "Request Minor code %d",
#   73|   			      mesg, BUFSIZ);
#   74|-> 	(void) fprintf(fp, mesg, event->minor_code);
#   75|   	if (ext) {
#   76|   	    XmuSnprintf(mesg, sizeof(mesg),

Error: COMPILER_WARNING (CWE-134): [#def19]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c:107:32: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#  107 |             (void) fprintf(fp, mesg, event->resourceid);
#      |                                ^~~~
#  105|   	if (mesg[0]) {
#  106|   	    fputs("  ", fp);
#  107|-> 	    (void) fprintf(fp, mesg, event->resourceid);
#  108|   	    fputs("\n", fp);
#  109|   	}

Error: COMPILER_WARNING (CWE-134): [#def20]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c:134:28: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#  134 |         (void) fprintf(fp, mesg, event->resourceid);
#      |                            ^~~~
#  132|   	    XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x",
#  133|   				  mesg, BUFSIZ);
#  134|-> 	(void) fprintf(fp, mesg, event->resourceid);
#  135|   	fputs("\n  ", fp);
#  136|       }

Error: COMPILER_WARNING (CWE-134): [#def21]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c:139:24: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#  139 |     (void) fprintf(fp, mesg, event->serial);
#      |                        ^~~~
#  137|       XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d",
#  138|   	mesg, BUFSIZ);
#  139|->     (void) fprintf(fp, mesg, event->serial);
#  140|       fputs("\n  ", fp);
#  141|       XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%d",

Error: COMPILER_WARNING (CWE-134): [#def22]
libXmu-1.2.1-build/libXmu-1.2.1/src/DefErrMsg.c:143:24: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#  143 |     (void) fprintf(fp, mesg, NextRequest(dpy)-1);
#      |                        ^~~~
#  141|       XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%d",
#  142|   	mesg, BUFSIZ);
#  143|->     (void) fprintf(fp, mesg, NextRequest(dpy)-1);
#  144|       fputs("\n", fp);
#  145|       if (event->error_code == BadImplementation) return 0;

Error: CPPCHECK_WARNING: [#def23]
libXmu-1.2.1-build/libXmu-1.2.1/src/EditresCom.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def24]
libXmu-1.2.1-build/libXmu-1.2.1/src/EditresCom.c:970:5: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'count' is still referred to by the global variable 'globals' upon returning to the caller.  This will be a dangling reference
#  968|       *(stream->top + 1) = count;
#  969|   
#  970|->     return (NULL);
#  971|   }
#  972|   

Error: COMPILER_WARNING (CWE-134): [#def25]
libXmu-1.2.1-build/libXmu-1.2.1/src/EditresCom.c: scope_hint: In function 'HandleToolkitErrors'
libXmu-1.2.1-build/libXmu-1.2.1/src/EditresCom.c:1000:9: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
# 1000 |         XmuSnprintf(buf, sizeof(buf), msg, params[0]);
#      |         ^~~~~~~~~~~
#  998|   		    info->event->name);
#  999|       else if (streq(name, "noColormap"))
# 1000|-> 	XmuSnprintf(buf, sizeof(buf), msg, params[0]);
# 1001|       else if (streq(name, "conversionFailed") || streq(name, "conversionError"))
# 1002|       {

Error: CLANG_WARNING: [#def26]
libXmu-1.2.1-build/libXmu-1.2.1/src/EditresCom.c:2086:17: warning[deadcode.DeadStores]: Value stored to 'string' during its initialization is never read
# 2084|       long value;
# 2085|       Cardinal i;
# 2086|->     const char *string = "";
# 2087|       Arg args[1];
# 2088|       XrmValue to, from;

Error: CPPCHECK_WARNING: [#def27]
libXmu-1.2.1-build/libXmu-1.2.1/src/LocBitmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
libXmu-1.2.1-build/libXmu-1.2.1/src/Lookup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def29]
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c: scope_hint: In function 'lookup'
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c:249:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'm'
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c:40: included_from: Included from here.
libXmu-1.2.1-build/libXmu-1.2.1/src/Xmuint.h:40:53: note: in definition of macro 'Xmumallocarray'
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c:246:17: note: in expansion of macro 'Xmumallocarray'
#  247|   
#  248|   	    for (i = 0, m = s, maps = stdcmaps; i < count; i++, m++, maps++) {
#  249|-> 		m->colormap   = maps->colormap;
#  250|   		m->red_max    = maps->red_max;
#  251|   		m->red_mult   = maps->red_mult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c:260:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'm'
libXmu-1.2.1-build/libXmu-1.2.1/src/Xmuint.h:40:53: note: in definition of macro 'Xmumallocarray'
libXmu-1.2.1-build/libXmu-1.2.1/src/LookupCmap.c:246:17: note: in expansion of macro 'Xmumallocarray'
#  258|   		m->killid     = maps->killid;
#  259|   	    }
#  260|-> 	    m->colormap   = cnew->colormap;
#  261|   	    m->red_max    = cnew->red_max;
#  262|   	    m->red_mult   = cnew->red_mult;

Error: CPPCHECK_WARNING: [#def32]
libXmu-1.2.1-build/libXmu-1.2.1/src/RdBitF.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def33]
libXmu-1.2.1-build/libXmu-1.2.1/src/StdCmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def34]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToBmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def35]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToCurs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-134): [#def36]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToCurs.c: scope_hint: In function 'XmuCvtStringToCursor'
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToCurs.c:178:29: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked
#  178 |                             mask_name, &mask_char);
#      |                             ^~~~~~~~~
#  176|   	    fields = sscanf(name, strspec,
#  177|   			    source_name, &source_char,
#  178|-> 			    mask_name, &mask_char);
#  179|   	    XtFree(strspec);
#  180|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def37]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToCurs.c:188: error[uninitvar]: Uninitialized variable: source_font
#  186|   	fromString.addr = source_name;
#  187|   	fromString.size = strlen(source_name) + 1;
#  188|-> 	toFont.addr = (XPointer) &source_font;
#  189|   	toFont.size = sizeof(Font);
#  190|   	cvtArg.addr = (XPointer) &dpy;

Error: CLANG_WARNING: [#def38]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToCurs.c:239:11: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
#  237|   	}
#  238|   
#  239|-> 	cursor = XCreateGlyphCursor( DisplayOfScreen(screen), source_font,
#  240|   				     mask_font, source_char, mask_char,
#  241|   				     &fgColor, &bgColor );

Error: CLANG_WARNING: [#def39]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToCurs.c:336:14: warning[core.NullDereference]: Dereference of undefined pointer value
#  334|       XmuCvtStringToCursor(args, &number, fromVal, &ret_val);
#  335|   
#  336|->     cursor = *((Cursor *) ret_val.addr);
#  337|   
#  338|       if (cursor == None || (fg == BlackPixelOfScreen(screen)

Error: CPPCHECK_WARNING: [#def40]
libXmu-1.2.1-build/libXmu-1.2.1/src/StrToShap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def41]
libXmu-1.2.1-build/libXmu-1.2.1/src/WidgetNode.c:132:47: warning[core.NullDereference]: Access to field 'resource_name' results in a dereference of a null pointer (loaded from variable 'childres')
#  130|       childres = node->constraints;
#  131|       for (i = 0; i < node->nconstraints; i++, childres++) {
#  132|-> 	node->constraintwn[i] = find_resource (node, childres->resource_name,
#  133|   						True);
#  134|       }

Error: CPPCHECK_WARNING: [#def42]
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def43]
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c: scope_hint: In function 'ComputeGLGR'
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c:103:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*data.GR_encoding'
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c: scope_hint: In function 'ComputeGLGR'
#  101|   	(data->GL[0] == '\102') &&
#  102|   	(data->GR_set_size == 96) && (data->GR_char_size == 1))
#  103|-> 	data->GLGR_encoding = data->GR_encoding;
#  104|       else if ((data->GL_set_size == 94) && (data->GL_char_size == 1) &&
#  105|   	     (data->GL[0] == '\112') &&

Error: GCC_ANALYZER_WARNING (CWE-688): [#def44]
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c: scope_hint: In function 'HandleExtended'
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c:309:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ptr' where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  307|   	}
#  308|   	ptr = malloc(len + 1);
#  309|-> 	memcpy(ptr, enc, len);
#  310|   	ptr[len] = 0x00;
#  311|   	priv->enc_count++;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def45]
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c: scope_hint: In function 'ShiftGRToGL'
libXmu-1.2.1-build/libXmu-1.2.1/src/Xct.c:340:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '**data.priv.itembuf' where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  338|   	    priv->itembuf = malloc(priv->buf_count);
#  339|       }
#  340|->     memcpy(priv->itembuf, data->item, data->item_length);
#  341|       data->item = priv->itembuf;
#  342|       if (hasCdata) {

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
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-175.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibXmu-1.2.1-1.fc41
store-results-to/tmp/tmpsob_9xmu/libXmu-1.2.1-1.fc41.tar.xz
time-created2024-07-03 14:31:13
time-finished2024-07-03 14:32:22
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpsob_9xmu/libXmu-1.2.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpsob_9xmu/libXmu-1.2.1-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9