Task #539 - cups-2.4.7-11.fc40/scan-results.err
back to task #539download
Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/dnssd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/backend/dnssd.c:883: error[memleak]: Memory leak: device.fullName # 881| } # 882| # 883|-> return (device); # 884| } # 885| Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/failover.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/ieee1284.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/ieee1284.c:190:2: warning[deadcode.DeadStores]: Value stored to 'got_id' is never read # 188| # 189| device_id[0] = '\0'; # 190|-> got_id = 0; # 191| } # 192| else Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/ieee1284.c:298:7: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 296| else # 297| { # 298|-> strlcpy(temp, make_model, sizeof(temp)); # 299| # 300| if ((tempptr = strchr(temp, ' ')) != NULL) Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/ipp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/ipp.c:2334:5: warning[deadcode.DeadStores]: Value stored to 'num_options' is never read # 2332| { # 2333| fprintf(stderr, "DEBUG: adjust_options(): Adjusting print-color-mode to monochrome.\n"); # 2334|-> num_options = cupsAddOption("print-color-mode", "monochrome", num_options, &options); # 2335| } # 2336| else if (strcmp(ipp_attr_value, "color") && (!strcmp(ppd_option_value, "CMY") Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/ipp.c:2341:5: warning[deadcode.DeadStores]: Value stored to 'num_options' is never read # 2339| { # 2340| fprintf(stderr, "DEBUG: adjust_options(): Adjusting print-color-mode to color.\n"); # 2341|-> num_options = cupsAddOption("print-color-mode", "color", num_options, &options); # 2342| } # 2343| } Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/lpd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/lpd.c:792:19: warning[core.NullDereference]: Dereference of null pointer # 790| */ # 791| # 792|-> if ((fd = socket(addr->addr.addr.sa_family, SOCK_STREAM, 0)) < 0) # 793| { # 794| perror("DEBUG: Unable to create socket"); Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/lpd.c:812:6: warning[core.NullDereference]: Dereference of null pointer # 810| if ((fd = cups_rresvport(&lport, # 811| reserve == RESERVE_RFC1179 ? 721 : 512, # 812|-> addr->addr.addr.sa_family)) < 0) # 813| { # 814| perror("DEBUG: Unable to reserve port"); Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/network.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/runloop.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/snmp-supplies.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/backend/snmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-252): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/backend/socket.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/backend/usb.c:46: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/backend/usb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/berkeley/lpc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/berkeley/lpq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/berkeley/lpr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/admin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/classes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/cgi-bin/help-index.c: scope_hint: In function ‘help_load_file’ cups-2.4.7-build/cups-2.4.7/cgi-bin/help-index.c:1040:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’ # 1038| */ # 1039| # 1040|-> for (ptr = node->text, text = node->text; *ptr;) # 1041| if (isspace(*ptr & 255)) # 1042| { Error: GCC_ANALYZER_WARNING (CWE-476): cups-2.4.7-build/cups-2.4.7/cgi-bin/help-index.c:1040:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’ # 1038| */ # 1039| # 1040|-> for (ptr = node->text, text = node->text; *ptr;) # 1041| if (isspace(*ptr & 255)) # 1042| { Error: CPPCHECK_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cgi-bin/help-index.c:1249: error[uninitvar]: Uninitialized variable: diff # 1247| else if (n1->section && n2->section && # 1248| (diff = strcmp(n1->section, n2->section)) != 0) # 1249|-> return (diff); # 1250| # 1251| return (_cups_strcasecmp(n1->text, n2->text)); Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/help.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/cgi-bin/ipp-var.c: scope_hint: In function ‘cgiGetAttributes’ cups-2.4.7-build/cups-2.4.7/cgi-bin/ipp-var.c:118:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘attrs[i]’ where non-null expected cups-2.4.7-build/cups-2.4.7/cups/http.h:20: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cups/ipp.h:18: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cups/cups.h:28: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cgi-bin/cgi.h:26: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cgi-bin/cgi-private.h:14: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cgi-bin/ipp-var.c:14: included_from: Included from here. /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 116| # 117| for (i = 0; i < num_attrs; i ++) # 118|-> if (!strcmp(attrs[i], name)) # 119| break; # 120| Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/jobs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/printers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/search.c: scope_hint: In function ‘cgiCompileSearch’ cups-2.4.7-build/cups-2.4.7/cgi-bin/search.c:190:29: warning[-Wuse-after-free]: pointer ‘s_68’ may be used after ‘realloc’ # 190 | sptr = temp + (sptr - s); # | ~~~~~~^~~~ cups-2.4.7-build/cups-2.4.7/cgi-bin/search.c:178:24: note: call to ‘realloc’ here # 178 | temp = (char *)realloc(s, slen); # | ^~~~~~~~~~~~~~~~ # 188| } # 189| # 190|-> sptr = temp + (sptr - s); # 191| s = temp; # 192| } Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/template.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c: scope_hint: In function ‘cgi_add_variable.part.0’ cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c:566:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_vars’ # 564| if (form_alloc == 0) # 565| free(temp_vars); # 566|-> return; # 567| } # 568| form_vars = temp_vars; Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c:566:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'temp_vars' # 564| if (form_alloc == 0) # 565| free(temp_vars); # 566|-> return; # 567| } # 568| form_vars = temp_vars; Error: CPPCHECK_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c:615: warning[uninitvar]: Uninitialized variables: &key.nvalues, &key.avalues, &key.values # 613| key.name = (char *)name; # 614| # 615|-> return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t), # 616| (int (*)(const void *, const void *))cgi_compare_variables)); # 617| } Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c:615:25: warning[unix.Malloc]: Use of memory after it is freed # 613| key.name = (char *)name; # 614| # 615|-> return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t), # 616| (int (*)(const void *, const void *))cgi_compare_variables)); # 617| } Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/cgi-bin/var.c:1257:3: warning[unix.Malloc]: Use of memory after it is freed # 1255| return; # 1256| # 1257|-> qsort(form_vars, (size_t)form_count, sizeof(_cgi_var_t), # 1258| (int (*)(const void *, const void *))cgi_compare_variables); # 1259| } Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/adminutil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/array.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/cups/array.c:425: error[memleak]: Memory leak: da.elements # 423| */ # 424| # 425|-> return (da); # 426| } # 427| Error: CPPCHECK_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/cups/array.c:771: error[memleak]: Memory leak: a.hash # 769| a->freefunc = ff; # 770| # 771|-> return (a); # 772| } # 773| Error: GCC_ANALYZER_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cups/array.c: scope_hint: In function ‘cups_array_find’ cups-2.4.7-build/cups-2.4.7/cups/array.c:1217:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1215| */ # 1216| # 1217|-> if ((diff = (*(a->compare))(e, a->elements[prev], a->data)) == 0 || # 1218| (diff < 0 && prev == 0) || # 1219| (diff > 0 && prev == (a->num_elements - 1))) Error: GCC_ANALYZER_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cups/array.c:1263:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1261| { # 1262| current = (left + right) / 2; # 1263|-> diff = (*(a->compare))(e, a->elements[current], a->data); # 1264| # 1265| DEBUG_printf(("9cups_array_find: left=%d, right=%d, current=%d, diff=%d", Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/auth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/backchannel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/debug.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/dest-localization.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/dest-options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/dest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-122): cups-2.4.7-build/cups-2.4.7/cups/dest.c: scope_hint: In function ‘cups_compare_dests’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/cups/encode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cups/encode.c:893: error[uninitvar]: Uninitialized variables: &key.multivalue, &key.value_tag, &key.group_tag, &key.alt_group_tag, &key.operations # 891| key.name = name; # 892| # 893|-> return ((_ipp_option_t *)bsearch(&key, ipp_options, # 894| sizeof(ipp_options) / sizeof(ipp_options[0]), # 895| sizeof(ipp_options[0]), Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/cups/getdevices.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/getputfile.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/globals.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/hash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/http-addrlist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/http-support.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/http.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/cups/http.c:1997:7: warning[deadcode.DeadStores]: Although the value stored to 'zerr' is used in the enclosing expression, the value is never actually read from 'zerr' # 1995| ((z_stream *)http->stream)->avail_out = (uInt)length; # 1996| # 1997|-> if ((zerr = inflate((z_stream *)http->stream, Z_SYNC_FLUSH)) < Z_OK) # 1998| { # 1999| DEBUG_printf(("2httpRead2: zerr=%d", zerr)); Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ipp-file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ipp-support.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ipp-vars.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ipp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-465): cups-2.4.7-build/cups-2.4.7/cups/ipp.c: scope_hint: In function ‘ipp_set_value’ cups-2.4.7-build/cups-2.4.7/cups/ipp.c:6722:6: warning[-Wanalyzer-deref-before-check]: check of ‘temp’ for NULL after already dereferencing it # 6720| */ # 6721| # 6722|-> if ((temp = realloc(temp, sizeof(ipp_attribute_t) + (size_t)(alloc_values - 1) * sizeof(_ipp_value_t))) == NULL) # 6723| { # 6724| _cupsSetHTTPError(HTTP_STATUS_ERROR); Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/language.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/md5.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-attr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-cache.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-conflicts.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-emit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-localize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-mark.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/cups/ppd-mark.c: scope_hint: In function ‘ppd_mark_option’ cups-2.4.7-build/cups-2.4.7/cups/ppd-mark.c:929:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 927| for (i = 0, val = vals; i < num_vals; i ++, val ++) # 928| { # 929|-> if ((cparam = ppdFindCustomParam(coption, val->name)) == NULL) # 930| continue; # 931| Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-page.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd-util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/ppd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/cups/ppd.c: scope_hint: In function ‘_ppdOpenFile’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/cups/ppd.c: scope_hint: In function ‘ppdSetConformance’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/cups/ppd.c:2337:1: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’ cups-2.4.7-build/cups-2.4.7/cups/ppd.c: scope_hint: In function ‘ppdSetConformance’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/cups/ppd.c: scope_hint: In function ‘ppd_read’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/cups/pwg-media.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/cups/raster-error.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/raster-interpret.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/raster-stream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/cups/raster-stream.c:836:33: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 834| } # 835| # 836|-> r->count = (unsigned)byte + 1; # 837| # 838| if (r->count > 1) Error: GCC_ANALYZER_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cups/raster-stream.c: scope_hint: In function ‘cups_raster_read’ cups-2.4.7-build/cups-2.4.7/cups/raster-stream.c:1514:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r_62(D)->bufptr’ # 1512| */ # 1513| # 1514|-> *buf = *(r->bufptr)++; # 1515| remaining --; # 1516| } Error: GCC_ANALYZER_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cups/raster-stream.c:1530:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*bufptr’ # 1528| # 1529| for (bufptr = r->bufptr; count > 0; count --, total ++) # 1530|-> *buf++ = *bufptr++; # 1531| # 1532| r->bufptr = bufptr; Error: GCC_ANALYZER_WARNING (CWE-457): cups-2.4.7-build/cups-2.4.7/cups/raster-stream.c:1540:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r.bufptr’ # 1538| */ # 1539| # 1540|-> memcpy(buf, r->bufptr, (size_t)count); # 1541| r->bufptr += count; # 1542| remaining -= count; Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/request.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/sidechannel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/snmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/string.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/cups/cups-private.h:25: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cups/ppd.c:18: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cups/ppd.c: scope_hint: In function ‘_ppdOpenFile’ cups-2.4.7-build/cups-2.4.7/cups/thread-private.h:42:37: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’ cups-2.4.7-build/cups-2.4.7/cups/ppd.c:375:7: note: in expansion of macro ‘_cupsThreadSetData’ cups-2.4.7-build/cups-2.4.7/cups/ppd.c: scope_hint: In function ‘_ppdOpenFile’ cups-2.4.7-build/cups-2.4.7/cups/ppd.c:375:7: note: in expansion of macro ‘_cupsThreadSetData’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/cups/tls.c:40: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/cups/tls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/transcode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/usersys.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/cups/util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/commandtops.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/gziptoany.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/pstops.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/rastertoepson.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/rastertohp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/rastertolabel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/filter/rastertopwg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-688): cups-2.4.7-build/cups-2.4.7/filter/rastertopwg.c: scope_hint: In function ‘main’ cups-2.4.7-build/cups-2.4.7/filter/rastertopwg.c:453: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 # 451| line = malloc(linesize); # 452| # 453|-> memset(line, white, linesize); # 454| for (y = page_top; y > 0; y --) # 455| if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine)) Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/locale/checkpo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/locale/po2strings.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/monitor/bcp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/monitor/tbcp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/notifier/dbus.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/notifier/mailto.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/notifier/rss.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/notifier/testnotify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc-catalog.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc-driver.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc-import.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc-source.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc.cxx:186:12: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'catalog' # 184| if (catalog->messages->count == 0 && strcmp(argv[i], "en")) # 185| { # 186|-> _cupsLangPrintf(stderr, # 187| _("ppdc: Unable to find localization for " # 188| "\"%s\" - %s"), argv[i], strerror(errno)); Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc.cxx:253:2: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'locales' # 251| if (errno != EEXIST) # 252| { # 253|-> _cupsLangPrintf(stderr, # 254| _("ppdc: Unable to create output directory %s: %s"), # 255| outdir, strerror(errno)); Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdc.cxx:253:2: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'src' # 251| if (errno != EEXIST) # 252| { # 253|-> _cupsLangPrintf(stderr, # 254| _("ppdc: Unable to create output directory %s: %s"), # 255| outdir, strerror(errno)); Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdhtml.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdmerge.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/ppdc/ppdpo.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/auth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/scheduler/auth.c: scope_hint: In function ‘pam_func’ cups-2.4.7-build/cups-2.4.7/scheduler/auth.c:2322:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 2320| # 2321| default: # 2322|-> free(replies); # 2323| return (PAM_CONV_ERR); # 2324| } Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/banners.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/cert.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/classes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/colorman.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-704): cups-2.4.7-build/cups-2.4.7/scheduler/colorman.c: scope_hint: In function ‘colord_create_profile’ cups-2.4.7-build/cups-2.4.7/scheduler/colorman.c:1083:26: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘cupsArrayAdd’ discards ‘const’ qualifier from pointer target type # 1083 | cupsArrayAdd(profiles, profile_path); # | ^~~~~~~~~~~~ cups-2.4.7-build/cups-2.4.7/cups/array-private.h:16: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cups/cups-private.h:20: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/scheduler/cupsd.h:18: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/scheduler/colorman.c:42: included_from: Included from here. cups-2.4.7-build/cups-2.4.7/cups/array.h:50:61: note: expected ‘void *’ but argument is of type ‘const char *’ # 50 | extern int cupsArrayAdd(cups_array_t *a, void *e) _CUPS_API_1_2; # | ~~~~~~^ # 1081| dbus_message_iter_get_basic(&args, &profile_path); # 1082| cupsdLogMessage(CUPSD_LOG_DEBUG, "Created profile \"%s\".", profile_path); # 1083|-> cupsArrayAdd(profiles, profile_path); # 1084| # 1085| out: Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/conf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/cups-deviced.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/cups-driverd.cxx: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/cups-exec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/cups-lpd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/scheduler/cupsfilter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/cupsfilter.c: scope_hint: In function ‘exec_filter’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/scheduler/cupsfilter.c: scope_hint: In function ‘sighandler’ cups-2.4.7-build/cups-2.4.7/scheduler/cupsfilter.c:1522:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/scheduler/dirsvc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-476): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/scheduler/env.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/ipp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/job.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/job.c:4109:11: warning[unix.Malloc]: Use of memory allocated with size zero # 4107| # 4108| optptr = options; # 4109|-> *optptr = '\0'; # 4110| # 4111| snprintf(title, title_size, "%s-%d", job->printer->name, job->id); Error: CPPCHECK_WARNING (CWE-758): cups-2.4.7-build/cups-2.4.7/scheduler/job.c:5897: warning[objectIndex]: The address of variable 'none' might be accessed at non-zero index. # 5895| # 5896| for (i = 0; i < num_reasons; i ++) # 5897|-> if (strcmp(job->printer_reasons->values[i].string.text, reasons[i])) # 5898| break; # 5899| Error: CPPCHECK_WARNING (CWE-758): cups-2.4.7-build/cups-2.4.7/scheduler/job.c:5916: warning[objectIndex]: The address of variable 'none' might be accessed at non-zero index. # 5914| # 5915| for (i = 0; i < num_reasons; i ++) # 5916|-> job->printer_reasons->values[i].string.text = _cupsStrAlloc(reasons[i]); # 5917| # 5918| job->dirty = 1; Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/log.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/scheduler/log.c: scope_hint: In function ‘format_log_line’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/scheduler/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-688): cups-2.4.7-build/cups-2.4.7/scheduler/main.c: scope_hint: In function ‘main’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/scheduler/mime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-476): cups-2.4.7-build/cups-2.4.7/scheduler/mime.c:179: error[ctunullpointer]: Null pointer dereference: mime # 177| # 178| # 179|-> if (mime->error_cb) # 180| { # 181| va_start(ap, message); Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/network.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/policy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/printers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/scheduler/process.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/quotas.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/select.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/statbuf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/subscriptions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/sysman.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/type.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-775): cups-2.4.7-build/cups-2.4.7/scheduler/util.c: scope_hint: In function ‘cupsdPipeCommand’ cups-2.4.7-build/cups-2.4.7/scheduler/util.c:301:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’ # 299| setuid(user); /* Run as restricted user */ # 300| # 301|-> if ((fd = open("/dev/null", O_RDONLY)) > 0) # 302| { # 303| dup2(fd, 0); /* </dev/null */ Error: GCC_ANALYZER_WARNING: cups-2.4.7-build/cups-2.4.7/scheduler/util.c:303:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 0)’ # 301| if ((fd = open("/dev/null", O_RDONLY)) > 0) # 302| { # 303|-> dup2(fd, 0); /* </dev/null */ # 304| close(fd); # 305| } Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/cancel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/cupstestppd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/lp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/lpadmin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/lpinfo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/lpoptions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/systemv/lpstat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/tools/ippevepcl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-775): cups-2.4.7-build/cups-2.4.7/tools/ippevepcl.c: scope_hint: In function ‘pcl_to_pcl’ cups-2.4.7-build/cups-2.4.7/tools/ippevepcl.c:270:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ # 268| { # 269| fprintf(stderr, "ERROR: Unable to open \"%s\": %s\n", filename, strerror(errno)); # 270|-> return (1); # 271| } # 272| } Error: CPPCHECK_WARNING: cups-2.4.7-build/cups-2.4.7/tools/ippeveprinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-686): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/tools/ippeveprinter.c: scope_hint: In function ‘html_printf’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/tools/ippeveps.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/tools/ippeveps.c: scope_hint: In function ‘jpeg_to_ps’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/tools/ippeveps.c: scope_hint: In function ‘pdf_to_ps’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/tools/ippfind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): cups-2.4.7-build/cups-2.4.7/tools/ippfind.c: scope_hint: In function ‘main’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/tools/ippfind.c: scope_hint: In function ‘browse_callback’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/tools/ippfind.c: scope_hint: In function ‘main’ cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/tools/ippfind.c: scope_hint: In function ‘new_expr’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/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): cups-2.4.7-build/cups-2.4.7/tools/ippfind.c:2510: error[memleak]: Memory leak: temp.args # 2508| } # 2509| # 2510|-> return (temp); # 2511| } # 2512| Error: GCC_ANALYZER_WARNING (CWE-688): cups-2.4.7-build/cups-2.4.7/tools/ippfind.c: scope_hint: In function ‘resolve_callback.part.0’ cups-2.4.7-build/cups-2.4.7/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: cups-2.4.7-build/cups-2.4.7/tools/ipptool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.