cups-2.4.10-1.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
cups-2.4.10-build/cups-2.4.10/backend/dnssd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-401): [#def2]
cups-2.4.10-build/cups-2.4.10/backend/dnssd.c:883: error[memleak]: Memory leak: device.fullName
# 881| }
# 882|
# 883|-> return (device);
# 884| }
# 885|
Error: CPPCHECK_WARNING: [#def3]
cups-2.4.10-build/cups-2.4.10/backend/failover.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def4]
cups-2.4.10-build/cups-2.4.10/backend/ieee1284.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def5]
cups-2.4.10-build/cups-2.4.10/backend/ieee1284.c:191:2: warning[deadcode.DeadStores]: Value stored to 'got_id' is never read
# 189|
# 190| device_id[0] = '\0';
# 191|-> got_id = 0;
# 192| }
# 193| else
Error: CLANG_WARNING: [#def6]
cups-2.4.10-build/cups-2.4.10/backend/ieee1284.c:299:7: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 297| else
# 298| {
# 299|-> strlcpy(temp, make_model, sizeof(temp));
# 300|
# 301| if ((tempptr = strchr(temp, ' ')) != NULL)
Error: CPPCHECK_WARNING: [#def7]
cups-2.4.10-build/cups-2.4.10/backend/ipp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def8]
cups-2.4.10-build/cups-2.4.10/backend/ipp.c:2364:5: warning[deadcode.DeadStores]: Value stored to 'num_options' is never read
# 2362| {
# 2363| fprintf(stderr, "DEBUG: adjust_options(): Adjusting print-color-mode to monochrome.\n");
# 2364|-> num_options = cupsAddOption("print-color-mode", "monochrome", num_options, &options);
# 2365| }
# 2366| else if (strcmp(ipp_attr_value, "color") && (!strcmp(ppd_option_value, "CMY")
Error: CLANG_WARNING: [#def9]
cups-2.4.10-build/cups-2.4.10/backend/ipp.c:2371:5: warning[deadcode.DeadStores]: Value stored to 'num_options' is never read
# 2369| {
# 2370| fprintf(stderr, "DEBUG: adjust_options(): Adjusting print-color-mode to color.\n");
# 2371|-> num_options = cupsAddOption("print-color-mode", "color", num_options, &options);
# 2372| }
# 2373| }
Error: CPPCHECK_WARNING: [#def10]
cups-2.4.10-build/cups-2.4.10/backend/lpd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def11]
cups-2.4.10-build/cups-2.4.10/backend/lpd.c:793:19: warning[core.NullDereference]: Dereference of null pointer
# 791| */
# 792|
# 793|-> if ((fd = socket(addr->addr.addr.sa_family, SOCK_STREAM, 0)) < 0)
# 794| {
# 795| perror("DEBUG: Unable to create socket");
Error: CLANG_WARNING: [#def12]
cups-2.4.10-build/cups-2.4.10/backend/lpd.c:813:6: warning[core.NullDereference]: Dereference of null pointer
# 811| if ((fd = cups_rresvport(&lport,
# 812| reserve == RESERVE_RFC1179 ? 721 : 512,
# 813|-> addr->addr.addr.sa_family)) < 0)
# 814| {
# 815| perror("DEBUG: Unable to reserve port");
Error: CPPCHECK_WARNING: [#def13]
cups-2.4.10-build/cups-2.4.10/backend/network.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def14]
cups-2.4.10-build/cups-2.4.10/backend/runloop.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def15]
cups-2.4.10-build/cups-2.4.10/backend/snmp-supplies.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def16]
cups-2.4.10-build/cups-2.4.10/backend/snmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-252): [#def17]
cups-2.4.10-build/cups-2.4.10/backend/snmp.c:797: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
# 795|
# 796| if (address)
# 797|-> add_array(Addresses, address);
# 798|
# 799| if ((debug = getenv("CUPS_DEBUG_LEVEL")) != NULL)
Error: CPPCHECK_WARNING (CWE-252): [#def18]
cups-2.4.10-build/cups-2.4.10/backend/snmp.c:830: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
# 828| {
# 829| if (!address)
# 830|-> add_array(Addresses, value);
# 831| }
# 832| else if (!_cups_strcasecmp(line, "Community"))
Error: CPPCHECK_WARNING (CWE-252): [#def19]
cups-2.4.10-build/cups-2.4.10/backend/snmp.c:833: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
# 831| }
# 832| else if (!_cups_strcasecmp(line, "Community"))
# 833|-> add_array(Communities, value);
# 834| else if (!_cups_strcasecmp(line, "DebugLevel"))
# 835| DebugLevel = atoi(value);
Error: CPPCHECK_WARNING (CWE-252): [#def20]
cups-2.4.10-build/cups-2.4.10/backend/snmp.c:879: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
# 877| {
# 878| fputs("INFO: Using default SNMP Community public\n", stderr);
# 879|-> add_array(Communities, "public");
# 880| }
# 881| }
Error: CPPCHECK_WARNING: [#def21]
cups-2.4.10-build/cups-2.4.10/backend/socket.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def22]
cups-2.4.10-build/cups-2.4.10/backend/usb.c:47: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/backend/usb-libusb.c:1475:10: warning[deadcode.DeadStores]: Although the value stored to 'errcode' is used in the enclosing expression, the value is never actually read from 'errcode'
# 1473| {
# 1474| printer->usblp_attached = 1;
# 1475|-> if ((errcode =
# 1476| libusb_detach_kernel_driver(printer->handle, printer->iface)) < 0)
# 1477| {
Error: CLANG_WARNING: [#def23]
cups-2.4.10-build/cups-2.4.10/backend/usb-libusb.c:1512:8: warning[deadcode.DeadStores]: Although the value stored to 'errcode' is used in the enclosing expression, the value is never actually read from 'errcode'
# 1510| printer->origconf = current;
# 1511|
# 1512|-> if ((errcode =
# 1513| libusb_get_config_descriptor (printer->device, printer->conf, &confptr))
# 1514| < 0)
Error: CLANG_WARNING: [#def24]
cups-2.4.10-build/cups-2.4.10/backend/usb-libusb.c:1557:15: warning[deadcode.DeadStores]: Although the value stored to 'errcode' is used in the enclosing expression, the value is never actually read from 'errcode'
# 1555| goto error;
# 1556| }
# 1557|-> else if ((errcode = libusb_detach_kernel_driver(printer->handle, printer->iface)) < 0)
# 1558| {
# 1559| fprintf(stderr,
Error: CPPCHECK_WARNING: [#def25]
cups-2.4.10-build/cups-2.4.10/backend/usb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def26]
cups-2.4.10-build/cups-2.4.10/berkeley/lpc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def27]
cups-2.4.10-build/cups-2.4.10/berkeley/lpq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def28]
cups-2.4.10-build/cups-2.4.10/berkeley/lpr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def29]
cups-2.4.10-build/cups-2.4.10/cgi-bin/admin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def30]
cups-2.4.10-build/cups-2.4.10/cgi-bin/classes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def31]
cups-2.4.10-build/cups-2.4.10/cgi-bin/help-index.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
cups-2.4.10-build/cups-2.4.10/cgi-bin/help-index.c: scope_hint: In function ‘help_load_file’
cups-2.4.10-build/cups-2.4.10/cgi-bin/help-index.c:1041:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
# 1039| */
# 1040|
# 1041|-> for (ptr = node->text, text = node->text; *ptr;)
# 1042| if (isspace(*ptr & 255))
# 1043| {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
cups-2.4.10-build/cups-2.4.10/cgi-bin/help-index.c:1041:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
# 1039| */
# 1040|
# 1041|-> for (ptr = node->text, text = node->text; *ptr;)
# 1042| if (isspace(*ptr & 255))
# 1043| {
Error: CPPCHECK_WARNING (CWE-457): [#def34]
cups-2.4.10-build/cups-2.4.10/cgi-bin/help-index.c:1250: error[uninitvar]: Uninitialized variable: diff
# 1248| else if (n1->section && n2->section &&
# 1249| (diff = strcmp(n1->section, n2->section)) != 0)
# 1250|-> return (diff);
# 1251|
# 1252| return (_cups_strcasecmp(n1->text, n2->text));
Error: CPPCHECK_WARNING: [#def35]
cups-2.4.10-build/cups-2.4.10/cgi-bin/help.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def36]
cups-2.4.10-build/cups-2.4.10/cgi-bin/help.c:321:8: warning[unix.Malloc]: Potential leak of memory pointed to by 'query'
# 319| */
# 320|
# 321|-> if (!helpfile || !printable)
# 322| cgiCopyTemplateLang("help-header.tmpl");
# 323| else
Error: CPPCHECK_WARNING: [#def37]
cups-2.4.10-build/cups-2.4.10/cgi-bin/ipp-var.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def38]
cups-2.4.10-build/cups-2.4.10/cgi-bin/ipp-var.c: scope_hint: In function ‘cgiGetAttributes’
cups-2.4.10-build/cups-2.4.10/cgi-bin/ipp-var.c:120:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘attrs[i]’ where non-null expected
cups-2.4.10-build/cups-2.4.10/cups/http.h:21: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cups/ipp.h:19: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cups/cups.h:28: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cgi-bin/cgi.h:27: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cgi-bin/cgi-private.h:16: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cgi-bin/ipp-var.c:16: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 118|
# 119| for (i = 0; i < num_attrs; i ++)
# 120|-> if (!strcmp(attrs[i], name))
# 121| break;
# 122|
Error: CPPCHECK_WARNING: [#def39]
cups-2.4.10-build/cups-2.4.10/cgi-bin/jobs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def40]
cups-2.4.10-build/cups-2.4.10/cgi-bin/printers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def41]
cups-2.4.10-build/cups-2.4.10/cgi-bin/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING: [#def42]
cups-2.4.10-build/cups-2.4.10/cgi-bin/search.c: scope_hint: In function ‘cgiCompileSearch’
cups-2.4.10-build/cups-2.4.10/cgi-bin/search.c:191:29: warning[-Wuse-after-free]: pointer ‘s_68’ may be used after ‘realloc’
# 191 | sptr = temp + (sptr - s);
# | ~~~~~~^~~~
cups-2.4.10-build/cups-2.4.10/cgi-bin/search.c:179:24: note: call to ‘realloc’ here
# 179 | temp = (char *)realloc(s, slen);
# | ^~~~~~~~~~~~~~~~
# 189| }
# 190|
# 191|-> sptr = temp + (sptr - s);
# 192| s = temp;
# 193| }
Error: CPPCHECK_WARNING: [#def43]
cups-2.4.10-build/cups-2.4.10/cgi-bin/template.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def44]
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c: scope_hint: In function ‘cgi_add_variable.part.0’
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c:642:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_vars’
# 640| if (form_alloc == 0)
# 641| free(temp_vars);
# 642|-> return;
# 643| }
# 644| form_vars = temp_vars;
Error: CLANG_WARNING: [#def46]
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c:642:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'temp_vars'
# 640| if (form_alloc == 0)
# 641| free(temp_vars);
# 642|-> return;
# 643| }
# 644| form_vars = temp_vars;
Error: CPPCHECK_WARNING (CWE-457): [#def47]
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c:691: warning[uninitvar]: Uninitialized variables: &key.nvalues, &key.avalues, &key.values
# 689| key.name = (char *)name;
# 690|
# 691|-> return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t),
# 692| (int (*)(const void *, const void *))cgi_compare_variables));
# 693| }
Error: CLANG_WARNING: [#def48]
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c:691:25: warning[unix.Malloc]: Use of memory after it is freed
# 689| key.name = (char *)name;
# 690|
# 691|-> return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t),
# 692| (int (*)(const void *, const void *))cgi_compare_variables));
# 693| }
Error: CLANG_WARNING: [#def49]
cups-2.4.10-build/cups-2.4.10/cgi-bin/var.c:1333:3: warning[unix.Malloc]: Use of memory after it is freed
# 1331| return;
# 1332|
# 1333|-> qsort(form_vars, (size_t)form_count, sizeof(_cgi_var_t),
# 1334| (int (*)(const void *, const void *))cgi_compare_variables);
# 1335| }
Error: CPPCHECK_WARNING: [#def50]
cups-2.4.10-build/cups-2.4.10/cups/adminutil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def51]
cups-2.4.10-build/cups-2.4.10/cups/array.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-401): [#def52]
cups-2.4.10-build/cups-2.4.10/cups/array.c:426: error[memleak]: Memory leak: da.elements
# 424| */
# 425|
# 426|-> return (da);
# 427| }
# 428|
Error: CPPCHECK_WARNING (CWE-401): [#def53]
cups-2.4.10-build/cups-2.4.10/cups/array.c:772: error[memleak]: Memory leak: a.hash
# 770| a->freefunc = ff;
# 771|
# 772|-> return (a);
# 773| }
# 774|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def54]
cups-2.4.10-build/cups-2.4.10/cups/array.c: scope_hint: In function ‘cups_array_find’
cups-2.4.10-build/cups-2.4.10/cups/array.c:1218:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
# 1216| */
# 1217|
# 1218|-> if ((diff = (*(a->compare))(e, a->elements[prev], a->data)) == 0 ||
# 1219| (diff < 0 && prev == 0) ||
# 1220| (diff > 0 && prev == (a->num_elements - 1)))
Error: GCC_ANALYZER_WARNING (CWE-457): [#def55]
cups-2.4.10-build/cups-2.4.10/cups/array.c:1264:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
# 1262| {
# 1263| current = (left + right) / 2;
# 1264|-> diff = (*(a->compare))(e, a->elements[current], a->data);
# 1265|
# 1266| DEBUG_printf(("9cups_array_find: left=%d, right=%d, current=%d, diff=%d",
Error: CPPCHECK_WARNING: [#def56]
cups-2.4.10-build/cups-2.4.10/cups/auth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def57]
cups-2.4.10-build/cups-2.4.10/cups/backchannel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def58]
cups-2.4.10-build/cups-2.4.10/cups/debug.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def59]
cups-2.4.10-build/cups-2.4.10/cups/dest-localization.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def60]
cups-2.4.10-build/cups-2.4.10/cups/dest-options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def61]
cups-2.4.10-build/cups-2.4.10/cups/dest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-122): [#def62]
cups-2.4.10-build/cups-2.4.10/cups/dest.c: scope_hint: In function ‘cups_compare_dests’
cups-2.4.10-build/cups-2.4.10/cups/dest.c:2569:42: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
# └─────────────────┘
# ^
# 2567|
# 2568|
# 2569|-> if ((diff = _cups_strcasecmp(a->name, b->name)) != 0)
# 2570| return (diff);
# 2571| else if (a->instance && b->instance)
Error: CPPCHECK_WARNING: [#def63]
cups-2.4.10-build/cups-2.4.10/cups/encode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-457): [#def64]
cups-2.4.10-build/cups-2.4.10/cups/encode.c:894: error[uninitvar]: Uninitialized variables: &key.multivalue, &key.value_tag, &key.group_tag, &key.alt_group_tag, &key.operations
# 892| key.name = name;
# 893|
# 894|-> return ((_ipp_option_t *)bsearch(&key, ipp_options,
# 895| sizeof(ipp_options) / sizeof(ipp_options[0]),
# 896| sizeof(ipp_options[0]),
Error: CPPCHECK_WARNING: [#def65]
cups-2.4.10-build/cups-2.4.10/cups/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def66]
cups-2.4.10-build/cups-2.4.10/cups/file.c:2419:12: warning[deadcode.DeadStores]: Although the value stored to 'status' is used in the enclosing expression, the value is never actually read from 'status'
# 2417| fp->crc = crc32(0L, Z_NULL, 0);
# 2418|
# 2419|-> if ((status = inflateInit2(&(fp->stream), -15)) != Z_OK)
# 2420| {
# 2421| DEBUG_printf(("9cups_fill: inflateInit2 returned %d, returning -1.", status));
Error: CPPCHECK_WARNING: [#def67]
cups-2.4.10-build/cups-2.4.10/cups/getdevices.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def68]
cups-2.4.10-build/cups-2.4.10/cups/getputfile.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def69]
cups-2.4.10-build/cups-2.4.10/cups/globals.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def70]
cups-2.4.10-build/cups-2.4.10/cups/hash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def71]
cups-2.4.10-build/cups-2.4.10/cups/http-addrlist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def72]
cups-2.4.10-build/cups-2.4.10/cups/http-support.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def73]
cups-2.4.10-build/cups-2.4.10/cups/http.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def74]
cups-2.4.10-build/cups-2.4.10/cups/http.c:1999:7: warning[deadcode.DeadStores]: Although the value stored to 'zerr' is used in the enclosing expression, the value is never actually read from 'zerr'
# 1997| ((z_stream *)http->stream)->avail_out = (uInt)length;
# 1998|
# 1999|-> if ((zerr = inflate((z_stream *)http->stream, Z_SYNC_FLUSH)) < Z_OK)
# 2000| {
# 2001| DEBUG_printf(("2httpRead2: zerr=%d", zerr));
Error: CPPCHECK_WARNING: [#def75]
cups-2.4.10-build/cups-2.4.10/cups/ipp-file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def76]
cups-2.4.10-build/cups-2.4.10/cups/ipp-support.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def77]
cups-2.4.10-build/cups-2.4.10/cups/ipp-vars.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def78]
cups-2.4.10-build/cups-2.4.10/cups/ipp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-465): [#def79]
cups-2.4.10-build/cups-2.4.10/cups/ipp.c: scope_hint: In function ‘ipp_set_value’
cups-2.4.10-build/cups-2.4.10/cups/ipp.c:6724:6: warning[-Wanalyzer-deref-before-check]: check of ‘temp’ for NULL after already dereferencing it
# 6722| */
# 6723|
# 6724|-> if ((temp = realloc(temp, sizeof(ipp_attribute_t) + (size_t)(alloc_values - 1) * sizeof(_ipp_value_t))) == NULL)
# 6725| {
# 6726| _cupsSetHTTPError(HTTP_STATUS_ERROR);
Error: CPPCHECK_WARNING: [#def80]
cups-2.4.10-build/cups-2.4.10/cups/language.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def81]
cups-2.4.10-build/cups-2.4.10/cups/md5.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def82]
cups-2.4.10-build/cups-2.4.10/cups/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def83]
cups-2.4.10-build/cups-2.4.10/cups/ppd-attr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def84]
cups-2.4.10-build/cups-2.4.10/cups/ppd-cache.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def85]
cups-2.4.10-build/cups-2.4.10/cups/ppd-conflicts.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def86]
cups-2.4.10-build/cups-2.4.10/cups/ppd-emit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def87]
cups-2.4.10-build/cups-2.4.10/cups/ppd-localize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def88]
cups-2.4.10-build/cups-2.4.10/cups/ppd-mark.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
cups-2.4.10-build/cups-2.4.10/cups/ppd-mark.c: scope_hint: In function ‘ppd_mark_option’
cups-2.4.10-build/cups-2.4.10/cups/ppd-mark.c:930:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 928| for (i = 0, val = vals; i < num_vals; i ++, val ++)
# 929| {
# 930|-> if ((cparam = ppdFindCustomParam(coption, val->name)) == NULL)
# 931| continue;
# 932|
Error: CPPCHECK_WARNING: [#def90]
cups-2.4.10-build/cups-2.4.10/cups/ppd-page.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def91]
cups-2.4.10-build/cups-2.4.10/cups/ppd-util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def92]
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def93]
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:528:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 526| */
# 527|
# 528|-> pg->ppd_status = PPD_OK;
# 529| pg->ppd_line = 0;
# 530|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def94]
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: scope_hint: In function ‘_ppdOpenFile’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:2279:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 2277| */
# 2278|
# 2279|-> pg->ppd_line = 0;
# 2280|
# 2281| /*
Error: GCC_ANALYZER_WARNING (CWE-476): [#def95]
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: scope_hint: In function ‘ppdSetConformance’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:2336:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 2334|
# 2335|
# 2336|-> pg->ppd_conform = c;
# 2337| }
# 2338|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:2337:1: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: scope_hint: In function ‘ppdSetConformance’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:375:7: note: in expansion of macro ‘_cupsThreadSetData’
# 2335|
# 2336| pg->ppd_conform = c;
# 2337|-> }
# 2338|
# 2339|
Error: GCC_ANALYZER_WARNING (CWE-127): [#def97]
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: scope_hint: In function ‘ppd_read’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:3196:42: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
# └──────────────────────────────────┘
# ^
# 3194| }
# 3195|
# 3196|-> if (lineptr > line->buffer && lineptr[-1] == '\n')
# 3197| lineptr --;
# 3198|
Error: CPPCHECK_WARNING: [#def98]
cups-2.4.10-build/cups-2.4.10/cups/pwg-media.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-457): [#def99]
cups-2.4.10-build/cups-2.4.10/cups/pwg-media.c:415: warning[uninitvar]: Uninitialized variable: name
# 413| */
# 414|
# 415|-> snprintf(keyword, keysize, "%s_%s_%s", prefix, name, usize);
# 416|
# 417| return (1);
Error: CPPCHECK_WARNING: [#def100]
cups-2.4.10-build/cups-2.4.10/cups/raster-error.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def101]
cups-2.4.10-build/cups-2.4.10/cups/raster-interpret.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def102]
cups-2.4.10-build/cups-2.4.10/cups/raster-stream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def103]
cups-2.4.10-build/cups-2.4.10/cups/raster-stream.c:837:33: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value
# 835| }
# 836|
# 837|-> r->count = (unsigned)byte + 1;
# 838|
# 839| if (r->count > 1)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def104]
cups-2.4.10-build/cups-2.4.10/cups/raster-stream.c: scope_hint: In function ‘cups_raster_read’
cups-2.4.10-build/cups-2.4.10/cups/raster-stream.c:1515:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r_62(D)->bufptr’
# 1513| */
# 1514|
# 1515|-> *buf = *(r->bufptr)++;
# 1516| remaining --;
# 1517| }
Error: GCC_ANALYZER_WARNING (CWE-457): [#def105]
cups-2.4.10-build/cups-2.4.10/cups/raster-stream.c:1531:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*bufptr’
# 1529|
# 1530| for (bufptr = r->bufptr; count > 0; count --, total ++)
# 1531|-> *buf++ = *bufptr++;
# 1532|
# 1533| r->bufptr = bufptr;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def106]
cups-2.4.10-build/cups-2.4.10/cups/raster-stream.c:1541:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r.bufptr’
# 1539| */
# 1540|
# 1541|-> memcpy(buf, r->bufptr, (size_t)count);
# 1542| r->bufptr += count;
# 1543| remaining -= count;
Error: CPPCHECK_WARNING: [#def107]
cups-2.4.10-build/cups-2.4.10/cups/request.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def108]
cups-2.4.10-build/cups-2.4.10/cups/sidechannel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def109]
cups-2.4.10-build/cups-2.4.10/cups/snmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def110]
cups-2.4.10-build/cups-2.4.10/cups/string.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
cups-2.4.10-build/cups-2.4.10/cups/cups-private.h:25: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:18: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: scope_hint: In function ‘_ppdOpenFile’
cups-2.4.10-build/cups-2.4.10/cups/thread-private.h:42:37: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:375:7: note: in expansion of macro ‘_cupsThreadSetData’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c: scope_hint: In function ‘_ppdOpenFile’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:375:7: note: in expansion of macro ‘_cupsThreadSetData’
cups-2.4.10-build/cups-2.4.10/cups/ppd.c:375:7: note: in expansion of macro ‘_cupsThreadSetData’
# 40| # define _CUPS_THREADKEY_INITIALIZER 0
# 41| # define _cupsThreadGetData(k) pthread_getspecific(k)
# 42|-> # define _cupsThreadSetData(k,p) pthread_setspecific(k,p)
# 43|
# 44| # elif defined(_WIN32) /* Windows threading */
Error: CLANG_WARNING: [#def112]
cups-2.4.10-build/cups-2.4.10/cups/tls.c:40: included_from: Included from here.
cups-2.4.10-build/cups-2.4.10/cups/tls-gnutls.c:910:8: warning[deadcode.DeadStores]: Although the value stored to 'result' is used in the enclosing expression, the value is never actually read from 'result'
# 908| return (NULL);
# 909|
# 910|-> if ((result = gnutls_x509_crt_init(&cert)) < 0)
# 911| {
# 912| DEBUG_printf(("4http_gnutls_create_credential: init error: %s", gnutls_strerror(result)));
Error: CLANG_WARNING: [#def113]
cups-2.4.10-build/cups-2.4.10/cups/tls-gnutls.c:919:8: warning[deadcode.DeadStores]: Although the value stored to 'result' is used in the enclosing expression, the value is never actually read from 'result'
# 917| datum.size = credential->datalen;
# 918|
# 919|-> if ((result = gnutls_x509_crt_import(cert, &datum, GNUTLS_X509_FMT_DER)) < 0)
# 920| {
# 921| DEBUG_printf(("4http_gnutls_create_credential: import error: %s", gnutls_strerror(result)));
Error: CPPCHECK_WARNING: [#def114]
cups-2.4.10-build/cups-2.4.10/cups/tls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def115]
cups-2.4.10-build/cups-2.4.10/cups/transcode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def116]
cups-2.4.10-build/cups-2.4.10/cups/usersys.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def117]
cups-2.4.10-build/cups-2.4.10/cups/util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def118]
cups-2.4.10-build/cups-2.4.10/filter/commandtops.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def119]
cups-2.4.10-build/cups-2.4.10/filter/common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def120]
cups-2.4.10-build/cups-2.4.10/filter/gziptoany.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def121]
cups-2.4.10-build/cups-2.4.10/filter/pstops.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def122]
cups-2.4.10-build/cups-2.4.10/filter/rastertoepson.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def123]
cups-2.4.10-build/cups-2.4.10/filter/rastertohp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def124]
cups-2.4.10-build/cups-2.4.10/filter/rastertolabel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def125]
cups-2.4.10-build/cups-2.4.10/filter/rastertopwg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def126]
cups-2.4.10-build/cups-2.4.10/filter/rastertopwg.c: scope_hint: In function ‘main’
cups-2.4.10-build/cups-2.4.10/filter/rastertopwg.c:454:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘line’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
# 452| line = malloc(linesize);
# 453|
# 454|-> memset(line, white, linesize);
# 455| for (y = page_top; y > 0; y --)
# 456| if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
Error: CPPCHECK_WARNING: [#def127]
cups-2.4.10-build/cups-2.4.10/locale/checkpo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def128]
cups-2.4.10-build/cups-2.4.10/locale/po2strings.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def129]
cups-2.4.10-build/cups-2.4.10/monitor/bcp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def130]
cups-2.4.10-build/cups-2.4.10/monitor/tbcp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def131]
cups-2.4.10-build/cups-2.4.10/notifier/dbus.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def132]
cups-2.4.10-build/cups-2.4.10/notifier/mailto.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def133]
cups-2.4.10-build/cups-2.4.10/notifier/rss.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def134]
cups-2.4.10-build/cups-2.4.10/notifier/testnotify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def135]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc-catalog.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def136]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc-driver.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def137]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc-import.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def138]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc-source.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def139]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def140]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc.cxx:187:12: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'catalog'
# 185| if (catalog->messages->count == 0 && strcmp(argv[i], "en"))
# 186| {
# 187|-> _cupsLangPrintf(stderr,
# 188| _("ppdc: Unable to find localization for "
# 189| "\"%s\" - %s"), argv[i], strerror(errno));
Error: CLANG_WARNING: [#def141]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc.cxx:254:2: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'locales'
# 252| if (errno != EEXIST)
# 253| {
# 254|-> _cupsLangPrintf(stderr,
# 255| _("ppdc: Unable to create output directory %s: %s"),
# 256| outdir, strerror(errno));
Error: CLANG_WARNING: [#def142]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdc.cxx:254:2: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'src'
# 252| if (errno != EEXIST)
# 253| {
# 254|-> _cupsLangPrintf(stderr,
# 255| _("ppdc: Unable to create output directory %s: %s"),
# 256| outdir, strerror(errno));
Error: CPPCHECK_WARNING: [#def143]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdhtml.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def144]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdmerge.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def145]
cups-2.4.10-build/cups-2.4.10/ppdc/ppdpo.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def146]
cups-2.4.10-build/cups-2.4.10/scheduler/auth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
cups-2.4.10-build/cups-2.4.10/scheduler/auth.c: scope_hint: In function ‘pam_func’
cups-2.4.10-build/cups-2.4.10/scheduler/auth.c:2323:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 2321|
# 2322| default:
# 2323|-> free(replies);
# 2324| return (PAM_CONV_ERR);
# 2325| }
Error: CPPCHECK_WARNING: [#def148]
cups-2.4.10-build/cups-2.4.10/scheduler/banners.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def149]
cups-2.4.10-build/cups-2.4.10/scheduler/cert.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def150]
cups-2.4.10-build/cups-2.4.10/scheduler/classes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def151]
cups-2.4.10-build/cups-2.4.10/scheduler/client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def152]
cups-2.4.10-build/cups-2.4.10/scheduler/colorman.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def153]
cups-2.4.10-build/cups-2.4.10/scheduler/conf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def154]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-deviced.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def155]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-driverd.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def156]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-exec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def157]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-lpd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def158]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-lpd.c:191:33: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
# 189|
# 190| #ifdef AF_INET6
# 191|-> if (hostaddr.addr.sa_family == AF_INET6)
# 192| hostfamily = "IPv6";
# 193| else
Error: CLANG_WARNING: [#def159]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-lpd.c:241:26: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
# 239| for (list = dest; *list && !isspace(*list & 255); list ++);
# 240|
# 241|-> while (isspace(*list & 255))
# 242| *list++ = '\0';
# 243| }
Error: CLANG_WARNING: [#def160]
cups-2.4.10-build/cups-2.4.10/scheduler/cups-lpd.c:295:23: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
# 293|
# 294| for (; *list && !isspace(*list & 255); list ++);
# 295|-> while (isspace(*list & 255))
# 296| *list++ = '\0';
# 297|
Error: CPPCHECK_WARNING: [#def161]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING: [#def162]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c: scope_hint: In function ‘exec_filter’
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:904:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘infd’
# 902| if (infd > 0)
# 903| {
# 904|-> dup2(infd, 0);
# 905| close(infd);
# 906| }
Error: GCC_ANALYZER_WARNING: [#def163]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:916:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘outfd’
# 914| if (outfd > 1)
# 915| {
# 916|-> dup2(outfd, 1);
# 917| close(outfd);
# 918| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def164]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:921:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 919| }
# 920|
# 921|-> if ((fd = open("/dev/null", O_RDWR)) > 3)
# 922| {
# 923| dup2(fd, 3);
Error: GCC_ANALYZER_WARNING: [#def165]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:923:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
# 921| if ((fd = open("/dev/null", O_RDWR)) > 3)
# 922| {
# 923|-> dup2(fd, 3);
# 924| close(fd);
# 925| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:928:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 926| fcntl(3, F_SETFL, O_NDELAY);
# 927|
# 928|-> if ((fd = open("/dev/null", O_RDWR)) > 4)
# 929| {
# 930| dup2(fd, 4);
Error: GCC_ANALYZER_WARNING: [#def167]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:930:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
# 928| if ((fd = open("/dev/null", O_RDWR)) > 4)
# 929| {
# 930|-> dup2(fd, 4);
# 931| close(fd);
# 932| }
Error: GCC_ANALYZER_WARNING (CWE-479): [#def168]
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c: scope_hint: In function ‘sighandler’
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:1522:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
cups-2.4.10-build/cups-2.4.10/scheduler/cupsfilter.c:1522:3: note: ‘_exit’ is a possible signal-safe alternative for ‘exit’
# 1520| */
# 1521|
# 1522|-> exit(s);
# 1523| }
# 1524|
Error: CPPCHECK_WARNING: [#def169]
cups-2.4.10-build/cups-2.4.10/scheduler/dirsvc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-476): [#def170]
cups-2.4.10-build/cups-2.4.10/scheduler/dirsvc.c:1017: error[ctunullpointer]: Null pointer dereference: srv
# 1015| avahi_threaded_poll_lock(DNSSDMaster);
# 1016|
# 1017|-> if (!*srv)
# 1018| *srv = avahi_entry_group_new(DNSSDClient, dnssdRegisterCallback, NULL);
# 1019| if (!*srv)
Error: CPPCHECK_WARNING: [#def171]
cups-2.4.10-build/cups-2.4.10/scheduler/env.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def172]
cups-2.4.10-build/cups-2.4.10/scheduler/filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def173]
cups-2.4.10-build/cups-2.4.10/scheduler/ipp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def174]
cups-2.4.10-build/cups-2.4.10/scheduler/job.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def175]
cups-2.4.10-build/cups-2.4.10/scheduler/job.c:4125:11: warning[unix.Malloc]: Use of memory allocated with size zero
# 4123|
# 4124| optptr = options;
# 4125|-> *optptr = '\0';
# 4126|
# 4127| snprintf(title, title_size, "%s-%d", job->printer->name, job->id);
Error: CPPCHECK_WARNING (CWE-758): [#def176]
cups-2.4.10-build/cups-2.4.10/scheduler/job.c:5913: warning[objectIndex]: The address of variable 'none' might be accessed at non-zero index.
# 5911|
# 5912| for (i = 0; i < num_reasons; i ++)
# 5913|-> if (strcmp(job->printer_reasons->values[i].string.text, reasons[i]))
# 5914| break;
# 5915|
Error: CPPCHECK_WARNING (CWE-758): [#def177]
cups-2.4.10-build/cups-2.4.10/scheduler/job.c:5932: warning[objectIndex]: The address of variable 'none' might be accessed at non-zero index.
# 5930|
# 5931| for (i = 0; i < num_reasons; i ++)
# 5932|-> job->printer_reasons->values[i].string.text = _cupsStrAlloc(reasons[i]);
# 5933|
# 5934| job->dirty = 1;
Error: CPPCHECK_WARNING: [#def178]
cups-2.4.10-build/cups-2.4.10/scheduler/log.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
cups-2.4.10-build/cups-2.4.10/scheduler/log.c: scope_hint: In function ‘format_log_line’
cups-2.4.10-build/cups-2.4.10/scheduler/log.c:1307:18: warning[-Wanalyzer-malloc-leak]: leak of ‘log_line’
# 1305| {
# 1306| log_linesize = 8192;
# 1307|-> log_line = malloc(log_linesize);
# 1308|
# 1309| if (!log_line)
Error: CPPCHECK_WARNING: [#def180]
cups-2.4.10-build/cups-2.4.10/scheduler/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def181]
cups-2.4.10-build/cups-2.4.10/scheduler/main.c: scope_hint: In function ‘main’
cups-2.4.10-build/cups-2.4.10/scheduler/main.c:341:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ConfigurationFile’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 339| size_t len; /* Size of buffer */
# 340|
# 341|-> len = strlen(ConfigurationFile) + 15;
# 342| if ((filename = malloc(len)) == NULL)
# 343| {
Error: CPPCHECK_WARNING: [#def182]
cups-2.4.10-build/cups-2.4.10/scheduler/mime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-476): [#def183]
cups-2.4.10-build/cups-2.4.10/scheduler/mime.c:180: error[ctunullpointer]: Null pointer dereference: mime
# 178|
# 179|
# 180|-> if (mime->error_cb)
# 181| {
# 182| va_start(ap, message);
Error: CPPCHECK_WARNING: [#def184]
cups-2.4.10-build/cups-2.4.10/scheduler/network.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def185]
cups-2.4.10-build/cups-2.4.10/scheduler/policy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def186]
cups-2.4.10-build/cups-2.4.10/scheduler/printers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def187]
cups-2.4.10-build/cups-2.4.10/scheduler/printers.c:953:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 951| }
# 952|
# 953|-> if (strncmp(p->device_uri, "file:", 5) && p->state != IPP_PRINTER_STOPPED)
# 954| {
# 955| /*
Error: CPPCHECK_WARNING: [#def188]
cups-2.4.10-build/cups-2.4.10/scheduler/process.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def189]
cups-2.4.10-build/cups-2.4.10/scheduler/quotas.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def190]
cups-2.4.10-build/cups-2.4.10/scheduler/select.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def191]
cups-2.4.10-build/cups-2.4.10/scheduler/statbuf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def192]
cups-2.4.10-build/cups-2.4.10/scheduler/subscriptions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def193]
cups-2.4.10-build/cups-2.4.10/scheduler/sysman.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def194]
cups-2.4.10-build/cups-2.4.10/scheduler/type.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
cups-2.4.10-build/cups-2.4.10/scheduler/util.c: scope_hint: In function ‘cupsdPipeCommand’
cups-2.4.10-build/cups-2.4.10/scheduler/util.c:302:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
# 300| setuid(user); /* Run as restricted user */
# 301|
# 302|-> if ((fd = open("/dev/null", O_RDONLY)) > 0)
# 303| {
# 304| dup2(fd, 0); /* </dev/null */
Error: GCC_ANALYZER_WARNING: [#def196]
cups-2.4.10-build/cups-2.4.10/scheduler/util.c:304:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 0)’
# 302| if ((fd = open("/dev/null", O_RDONLY)) > 0)
# 303| {
# 304|-> dup2(fd, 0); /* </dev/null */
# 305| close(fd);
# 306| }
Error: CPPCHECK_WARNING: [#def197]
cups-2.4.10-build/cups-2.4.10/systemv/cancel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def198]
cups-2.4.10-build/cups-2.4.10/systemv/cupstestppd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def199]
cups-2.4.10-build/cups-2.4.10/systemv/lp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def200]
cups-2.4.10-build/cups-2.4.10/systemv/lpadmin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def201]
cups-2.4.10-build/cups-2.4.10/systemv/lpinfo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def202]
cups-2.4.10-build/cups-2.4.10/systemv/lpoptions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def203]
cups-2.4.10-build/cups-2.4.10/systemv/lpstat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def204]
cups-2.4.10-build/cups-2.4.10/tools/ippevepcl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def205]
cups-2.4.10-build/cups-2.4.10/tools/ippevepcl.c: scope_hint: In function ‘pcl_to_pcl’
cups-2.4.10-build/cups-2.4.10/tools/ippevepcl.c:271:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
# 269| {
# 270| fprintf(stderr, "ERROR: Unable to open \"%s\": %s\n", filename, strerror(errno));
# 271|-> return (1);
# 272| }
# 273| }
Error: CPPCHECK_WARNING: [#def206]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-686): [#def207]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3004:15: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char (*)[32]’ for variadic argument 1 of ‘ap’
# 3002|
# 3003| format ++;
# 3004|-> width = va_arg(ap, int);
# 3005|
# 3006| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", width);
Error: GCC_ANALYZER_WARNING (CWE-686): [#def208]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c: scope_hint: In function ‘html_printf’
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3004:15: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 1 of ‘ap’
# 3002|
# 3003| format ++;
# 3004|-> width = va_arg(ap, int);
# 3005|
# 3006| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", width);
Error: GCC_ANALYZER_WARNING (CWE-686): [#def209]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3004:15: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘const char *’ for variadic argument 1 of ‘ap’
# 3002|
# 3003| format ++;
# 3004|-> width = va_arg(ap, int);
# 3005|
# 3006| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", width);
Error: GCC_ANALYZER_WARNING (CWE-685): [#def210]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3004:15: warning[-Wanalyzer-va-list-exhausted]: ‘ap’ has no more arguments (0 consumed)
# 3002|
# 3003| format ++;
# 3004|-> width = va_arg(ap, int);
# 3005|
# 3006| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", width);
Error: GCC_ANALYZER_WARNING (CWE-686): [#def211]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3036:16: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char (*)[32]’ for variadic argument 1 of ‘ap’
# 3034|
# 3035| format ++;
# 3036|-> prec = va_arg(ap, int);
# 3037|
# 3038| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", prec);
Error: GCC_ANALYZER_WARNING (CWE-686): [#def212]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3036:16: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 1 of ‘ap’
# 3034|
# 3035| format ++;
# 3036|-> prec = va_arg(ap, int);
# 3037|
# 3038| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", prec);
Error: GCC_ANALYZER_WARNING (CWE-686): [#def213]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3036:16: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘const char *’ for variadic argument 1 of ‘ap’
# 3034|
# 3035| format ++;
# 3036|-> prec = va_arg(ap, int);
# 3037|
# 3038| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", prec);
Error: GCC_ANALYZER_WARNING (CWE-685): [#def214]
cups-2.4.10-build/cups-2.4.10/tools/ippeveprinter.c:3036:16: warning[-Wanalyzer-va-list-exhausted]: ‘ap’ has no more arguments (0 consumed)
# 3034|
# 3035| format ++;
# 3036|-> prec = va_arg(ap, int);
# 3037|
# 3038| snprintf(tptr, sizeof(tformat) - (size_t)(tptr - tformat), "%d", prec);
Error: CPPCHECK_WARNING: [#def215]
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def216]
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c:468:18: warning[core.NullDereference]: Access to field 'sides_option' results in a dereference of a null pointer (loaded from variable 'ppd_cache')
# 466| value = getenv("IPP_SIDES_DEFAULT");
# 467|
# 468|-> if (value && ppd_cache->sides_option)
# 469| {
# 470| if (!strcmp(value, "one-sided") && ppd_cache->sides_1sided)
Error: CLANG_WARNING: [#def217]
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c:502:21: warning[core.NullDereference]: Array access results in a null pointer dereference
# 500| pcm = 0;
# 501|
# 502|-> num_presets = ppd_cache->num_presets[pcm][pq];
# 503| presets = ppd_cache->presets[pcm][pq];
# 504|
Error: GCC_ANALYZER_WARNING (CWE-775): [#def218]
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c: scope_hint: In function ‘jpeg_to_ps’
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c:564:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
# 562| {
# 563| fprintf(stderr, "ERROR: Unable to open \"%s\": %s\n", filename, strerror(errno));
# 564|-> return (1);
# 565| }
# 566| }
Error: GCC_ANALYZER_WARNING (CWE-835): [#def219]
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c:589:61: warning[-Wanalyzer-infinite-loop]: infinite loop
# 587| }
# 588|
# 589|-> for (bufptr = buffer + 2, bufend = buffer + bytes; bufptr < bufend;)
# 590| {
# 591| /*
Error: GCC_ANALYZER_WARNING: [#def220]
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c: scope_hint: In function ‘pdf_to_ps’
cups-2.4.10-build/cups-2.4.10/tools/ippeveps.c:833:5: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
# 831|
# 832| close(1);
# 833|-> dup2(tempfd, 1);
# 834| close(tempfd);
# 835|
Error: CPPCHECK_WARNING: [#def221]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c: scope_hint: In function ‘main’
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:345:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 343| i ++;
# 344|
# 345|-> if (i >= argc)
# 346| {
# 347| _cupsLangPrintf(stderr, _("ippfind: Expected semi-colon after %s."),
Error: CLANG_WARNING: [#def223]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:854:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'current'
# 852| if ((temp = new_expr(IPPFIND_OP_PRINT_NAME, invert, NULL, NULL,
# 853| NULL)) == NULL)
# 854|-> return (IPPFIND_EXIT_MEMORY);
# 855|
# 856| have_output = 1;
Error: CLANG_WARNING: [#def224]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:995:10: warning[unix.Malloc]: Potential leak of memory pointed to by 'parent'
# 993|
# 994| if ((temp = new_expr(IPPFIND_OP_AND, invert, NULL, NULL, NULL)) == NULL)
# 995|-> return (IPPFIND_EXIT_MEMORY);
# 996|
# 997| parens[num_parens++] = temp;
Error: CLANG_WARNING: [#def225]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:1057:15: warning[unix.Malloc]: Potential leak of memory pointed to by 'current'
# 1055|
# 1056| if ((temp = new_expr(IPPFIND_OP_PRINT_URI, 0, NULL, NULL, NULL)) == NULL)
# 1057|-> return (IPPFIND_EXIT_MEMORY);
# 1058|
# 1059| if (current)
Error: CLANG_WARNING: [#def226]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:1144:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'current'
# 1142| if ((avahi_poll = avahi_simple_poll_new()) == NULL)
# 1143| {
# 1144|-> _cupsLangPrintf(stderr, _("ippfind: Unable to use Bonjour: %s"),
# 1145| strerror(errno));
# 1146| return (IPPFIND_EXIT_BONJOUR);
Error: CLANG_WARNING: [#def227]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:1144:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'expressions'
# 1142| if ((avahi_poll = avahi_simple_poll_new()) == NULL)
# 1143| {
# 1144|-> _cupsLangPrintf(stderr, _("ippfind: Unable to use Bonjour: %s"),
# 1145| strerror(errno));
# 1146| return (IPPFIND_EXIT_BONJOUR);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def228]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c: scope_hint: In function ‘browse_callback’
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:1590:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1588|
# 1589| if (flags & AVAHI_LOOKUP_RESULT_LOCAL)
# 1590|-> service->is_local = 1;
# 1591| break;
# 1592|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c: scope_hint: In function ‘main’
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:2498:28: warning[-Wanalyzer-malloc-leak]: leak of ‘new_expr(16, invert, 0, 0, argv + (long unsigned int)i * 8)’
# 2496| int num_args; /* Number of arguments */
# 2497|
# 2498|-> for (num_args = 1; args[num_args]; num_args ++)
# 2499| if (!strcmp(args[num_args], ";"))
# 2500| break;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c: scope_hint: In function ‘new_expr’
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:2504:8: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
# 2502| temp->num_args = num_args;
# 2503| temp->args = malloc((size_t)num_args * sizeof(char *));
# 2504|-> if (temp->args == NULL)
# 2505| return (NULL);
# 2506|
Error: CLANG_WARNING: [#def231]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:2505:15: warning[unix.Malloc]: Potential leak of memory pointed to by 'temp'
# 2503| temp->args = malloc((size_t)num_args * sizeof(char *));
# 2504| if (temp->args == NULL)
# 2505|-> return (NULL);
# 2506|
# 2507| memcpy(temp->args, args, (size_t)num_args * sizeof(char *));
Error: CPPCHECK_WARNING (CWE-401): [#def232]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:2510: error[memleak]: Memory leak: temp.args
# 2508| }
# 2509|
# 2510|-> return (temp);
# 2511| }
# 2512|
Error: GCC_ANALYZER_WARNING (CWE-688): [#def233]
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c: scope_hint: In function ‘resolve_callback.part.0’
cups-2.4.10-build/cups-2.4.10/tools/ippfind.c:2668:27: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘strdup(hostTarget)’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 2666| service->port = port;
# 2667|
# 2668|-> value = service->host + strlen(service->host) - 1;
# 2669| if (value >= service->host && *value == '.')
# 2670| *value = '\0';
Error: CPPCHECK_WARNING: [#def234]
cups-2.4.10-build/cups-2.4.10/tools/ipptool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-136.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | cups-2.4.10-1.fc41 |
store-results-to | /tmp/tmponzd93u1/cups-2.4.10-1.fc41.tar.xz |
time-created | 2024-07-03 12:18:48 |
time-finished | 2024-07-03 12:23:24 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmponzd93u1/cups-2.4.10-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmponzd93u1/cups-2.4.10-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |