Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/cups-bjnp-2.0.3/bjnp-io.h
Examining data/cups-bjnp-2.0.3/bjnp-commands.c
Examining data/cups-bjnp-2.0.3/bjnp.c
Examining data/cups-bjnp-2.0.3/bjnp-utils.c
Examining data/cups-bjnp-2.0.3/bjnp-commands.h
Examining data/cups-bjnp-2.0.3/bjnp-protocol.h
Examining data/cups-bjnp-2.0.3/bjnp.h
Examining data/cups-bjnp-2.0.3/bjnp-io.c
Examining data/cups-bjnp-2.0.3/bjnp-discover.c
Examining data/cups-bjnp-2.0.3/bjnp-debug.c
Examining data/cups-bjnp-2.0.3/bjnp-runloop.c
Examining data/cups-bjnp-2.0.3/bjnp-levels.c

FINAL RESULTS:

data/cups-bjnp-2.0.3/bjnp-commands.c:196:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(IEEE1284_id, printer_id);
data/cups-bjnp-2.0.3/bjnp-commands.c:263:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(status_buf, response.udp_status_response_v2.status);
data/cups-bjnp-2.0.3/bjnp-commands.c:268:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(status_buf, response.udp_status_response.status);
data/cups-bjnp-2.0.3/bjnp-debug.c:202:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        vsnprintf(printbuf, sizeof(printbuf), fmt, ap);
data/cups-bjnp-2.0.3/bjnp-discover.c:229:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(printers[i].hostname, host);
data/cups-bjnp-2.0.3/bjnp-discover.c:256:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(printers[*no_printers].hostname, host);
data/cups-bjnp-2.0.3/bjnp-discover.c:257:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(printers[*no_printers].mac_address, mac_address);
data/cups-bjnp-2.0.3/bjnp-levels.c:237:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(marker_colors, cartridge_types[type].marker_color);
data/cups-bjnp-2.0.3/bjnp-levels.c:238:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(marker_low_levels, cartridge_types[type].marker_low_level);
data/cups-bjnp-2.0.3/bjnp-levels.c:239:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(marker_high_levels, cartridge_types[type].marker_high_level);
data/cups-bjnp-2.0.3/bjnp-levels.c:240:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(marker_names, cartridge_types[type].marker_name);
data/cups-bjnp-2.0.3/bjnp-levels.c:241:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(marker_types, cartridge_types[type].marker_type);
data/cups-bjnp-2.0.3/bjnp-levels.c:247:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(marker_colors,  cartridge_types[type].marker_color);
data/cups-bjnp-2.0.3/bjnp-levels.c:250:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(marker_low_levels,  cartridge_types[type].marker_low_level);
data/cups-bjnp-2.0.3/bjnp-levels.c:253:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(marker_high_levels,  cartridge_types[type].marker_high_level);
data/cups-bjnp-2.0.3/bjnp-levels.c:256:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(marker_names,  cartridge_types[type].marker_name);
data/cups-bjnp-2.0.3/bjnp-levels.c:259:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(marker_types,  cartridge_types[type].marker_type);
data/cups-bjnp-2.0.3/bjnp-levels.c:272:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(marker_levels, level);
data/cups-bjnp-2.0.3/bjnp-levels.c:277:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(marker_levels, level);
data/cups-bjnp-2.0.3/bjnp-utils.c:102:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(family, BJNP_FAMILY_IPV4);
data/cups-bjnp-2.0.3/bjnp-utils.c:111:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(addr_string, "[%s%%%d]", tmp_addr,
data/cups-bjnp-2.0.3/bjnp-utils.c:114:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(addr_string, "[%s]", tmp_addr);
data/cups-bjnp-2.0.3/bjnp-utils.c:118:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(family, BJNP_FAMILY_IPV6);
data/cups-bjnp-2.0.3/bjnp-utils.c:126:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(family, BJNP_FAMILY_UNKNOWN);
data/cups-bjnp-2.0.3/bjnp-utils.c:158:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(s, printer_id);
data/cups-bjnp-2.0.3/bjnp-utils.c:166:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(model, tok + strlen(DES_TOKEN));
data/cups-bjnp-2.0.3/bjnp-utils.c:288:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(name, ip_address);
data/cups-bjnp-2.0.3/bjnp-utils.c:327:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(name, ip_address);
data/cups-bjnp-2.0.3/bjnp-utils.c:333:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(name, ip_address);
data/cups-bjnp-2.0.3/bjnp.h:205:25:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define _cupsLangPrintf fprintf
data/cups-bjnp-2.0.3/bjnp.c:121:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        debug_level = getenv("BJNP_DEBUG_LEVEL");
data/cups-bjnp-2.0.3/bjnp.c:122:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        debug_file_name = getenv("BJNP_DEBUG_FILE");
data/cups-bjnp-2.0.3/bjnp.c:294:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            if (getenv("CLASS") != NULL) {
data/cups-bjnp-2.0.3/bjnp-commands.c:80:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ipaddress[128];
data/cups-bjnp-2.0.3/bjnp-commands.c:83:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char family[BJNP_FAMILY_MAX];
data/cups-bjnp-2.0.3/bjnp-commands.c:145:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char printer_id[BJNP_IEEE1284_MAX];
data/cups-bjnp-2.0.3/bjnp-commands.c:152:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(model, "Unidentified printer");
data/cups-bjnp-2.0.3/bjnp-commands.c:282:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char hostname[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-debug.c:37:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char string[10];
data/cups-bjnp-2.0.3/bjnp-debug.c:72:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char hdigit[16] = {
data/cups-bjnp-2.0.3/bjnp-debug.c:135:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[100];       /* actually only 1+8+1+8*3+1+8*3+1+4+16 = 80 bytes needed */
data/cups-bjnp-2.0.3/bjnp-debug.c:194:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char printbuf[1024];
data/cups-bjnp-2.0.3/bjnp-debug.c:240:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char loglevel[16];
data/cups-bjnp-2.0.3/bjnp-debug.c:262:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((debug_file = fopen(filename, "w")) == NULL) {
data/cups-bjnp-2.0.3/bjnp-discover.c:112:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&local_sa_copy, local_sa, sa_size(*local_sa));
data/cups-bjnp-2.0.3/bjnp-discover.c:130:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(dest_sa, broadcast_sa, sa_size(*dest_sa));
data/cups-bjnp-2.0.3/bjnp-discover.c:206:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ip_addr[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-discover.c:208:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char family[BJNP_FAMILY_MAX];
data/cups-bjnp-2.0.3/bjnp-discover.c:211:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char host[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-discover.c:228:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(printers[i].addr, printer_sa, sa_size(*printer_sa));
data/cups-bjnp-2.0.3/bjnp-discover.c:253:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(printers[*no_printers].addr, printer_sa, sa_size(*printer_sa));
data/cups-bjnp-2.0.3/bjnp-discover.c:275:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char mac_address_string[BJNP_SERIAL_MAX];
data/cups-bjnp-2.0.3/bjnp-discover.c:297:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&printer_addr, printer_sa, sa_size(*printer_sa));
data/cups-bjnp-2.0.3/bjnp-discover.c:300:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(printer_addr.ipv6.sin6_addr.s6_addr,
data/cups-bjnp-2.0.3/bjnp-discover.c:334:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char host[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-discover.c:336:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char family[BJNP_FAMILY_MAX];
data/cups-bjnp-2.0.3/bjnp-discover.c:491:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                        char bjnp_id[5];
data/cups-bjnp-2.0.3/bjnp-io.c:88:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char host[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-io.c:89:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char family[BJNP_FAMILY_MAX];
data/cups-bjnp-2.0.3/bjnp-io.c:165:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char host[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-io.c:167:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char family[BJNP_FAMILY_MAX];
data/cups-bjnp-2.0.3/bjnp-io.c:192:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&(printer->printer_sa), addr, sa_size(printer->printer_sa));
data/cups-bjnp-2.0.3/bjnp-io.c:291:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&(printer->print_buf.tcp_print.data), buf, count);
data/cups-bjnp-2.0.3/bjnp-io.h:70:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char IEEE1284_id[BJNP_IEEE1284_MAX];
data/cups-bjnp-2.0.3/bjnp-io.h:71:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char model[BJNP_MODEL_MAX];
data/cups-bjnp-2.0.3/bjnp-levels.c:135:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char levels[BJNP_ARG_MAX];
data/cups-bjnp-2.0.3/bjnp-levels.c:144:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char marker_colors[BJNP_REPORT_MAX] = "";
data/cups-bjnp-2.0.3/bjnp-levels.c:145:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char marker_low_levels[BJNP_REPORT_MAX] = "";
data/cups-bjnp-2.0.3/bjnp-levels.c:146:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char marker_high_levels[BJNP_REPORT_MAX] = "";
data/cups-bjnp-2.0.3/bjnp-levels.c:147:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char marker_names[BJNP_REPORT_MAX] = "";
data/cups-bjnp-2.0.3/bjnp-levels.c:148:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char marker_types[BJNP_REPORT_MAX] = "";
data/cups-bjnp-2.0.3/bjnp-levels.c:149:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char marker_levels[BJNP_REPORT_MAX] = "";
data/cups-bjnp-2.0.3/bjnp-levels.c:150:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char level[16];
data/cups-bjnp-2.0.3/bjnp-levels.c:271:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(level, "%d", printer->cartridges[i].marker_level);
data/cups-bjnp-2.0.3/bjnp-levels.c:276:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(level, "%d", printer->cartridges[i].marker_level);
data/cups-bjnp-2.0.3/bjnp-levels.c:434:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char warnings[BJNP_ARG_MAX];
data/cups-bjnp-2.0.3/bjnp-levels.c:543:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char argument[BJNP_ARG_MAX];
data/cups-bjnp-2.0.3/bjnp-levels.c:591:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char argument[BJNP_ARG_MAX];
data/cups-bjnp-2.0.3/bjnp-levels.c:643:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char status_buf[BJNP_STATUS_MAX];
data/cups-bjnp-2.0.3/bjnp-protocol.h:52:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char BJNP_id[4];              /* string: BJNP */
data/cups-bjnp-2.0.3/bjnp-protocol.h:72:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char unknown[8];          /* don't know what these are for */
data/cups-bjnp-2.0.3/bjnp-protocol.h:73:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char hostname[64];        /* hostname of sender */
data/cups-bjnp-2.0.3/bjnp-protocol.h:74:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char username[64];        /* username */
data/cups-bjnp-2.0.3/bjnp-protocol.h:75:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char jobtitle[256];       /* job title */
data/cups-bjnp-2.0.3/bjnp-protocol.h:82:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char data [BJNP_PRINTBUF_MAX];
data/cups-bjnp-2.0.3/bjnp-protocol.h:98:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char unknown1[4];         /* 00 01 08 00 */
data/cups-bjnp-2.0.3/bjnp-protocol.h:101:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char mac_addr[6];/* printers mac address */
data/cups-bjnp-2.0.3/bjnp-protocol.h:104:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                unsigned char ipv4_addr[4];
data/cups-bjnp-2.0.3/bjnp-protocol.h:109:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                unsigned char ipv6_addr[8][16];
data/cups-bjnp-2.0.3/bjnp-protocol.h:133:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char status[BJNP_UDP_MAX];
data/cups-bjnp-2.0.3/bjnp-protocol.h:138:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char status[BJNP_UDP_MAX];
data/cups-bjnp-2.0.3/bjnp-protocol.h:144:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char id[2048];            /* identity */
data/cups-bjnp-2.0.3/bjnp-protocol.h:146:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fillers[65536];
data/cups-bjnp-2.0.3/bjnp-runloop.c:60:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char print_buffer[BJNP_PRINTBUF_MAX], /* Print data buffer */
data/cups-bjnp-2.0.3/bjnp-runloop.c:71:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char data[16536];                     /* Request/response data */
data/cups-bjnp-2.0.3/bjnp-runloop.c:73:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char model[BJNP_MODEL_MAX];           /* printer make & model */
data/cups-bjnp-2.0.3/bjnp-runloop.c:74:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char dev_id[BJNP_IEEE1284_MAX];       /* IEEE1284 device id */
data/cups-bjnp-2.0.3/bjnp-utils.c:96:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp_addr[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-utils.c:124:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(addr_string, "Unknown address family");
data/cups-bjnp-2.0.3/bjnp-utils.c:146:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char s[BJNP_IEEE1284_MAX];
data/cups-bjnp-2.0.3/bjnp-utils.c:208:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char hdigit[16] = {
data/cups-bjnp-2.0.3/bjnp-utils.c:257:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ip_address[BJNP_HOST_MAX];
data/cups-bjnp-2.0.3/bjnp-utils.c:258:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char service[64];
data/cups-bjnp-2.0.3/bjnp-utils.c:296:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(service, "%d", *port);
data/cups-bjnp-2.0.3/bjnp.c:59:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char method[255];             /* Method in URI */
data/cups-bjnp-2.0.3/bjnp.c:60:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char hostname[1024];          /* Hostname */
data/cups-bjnp-2.0.3/bjnp.c:61:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char username[255];           /* Username info (not used) */
data/cups-bjnp-2.0.3/bjnp.c:62:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char resource[1024];          /* Resource info */
data/cups-bjnp-2.0.3/bjnp.c:73:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char portname[255];           /* Port name */
data/cups-bjnp-2.0.3/bjnp.c:74:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char family[BJNP_FAMILY_MAX]; /* address family */
data/cups-bjnp-2.0.3/bjnp.c:79:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char addrname[256];           /* Address name */
data/cups-bjnp-2.0.3/bjnp.c:162:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((print_fd = open(argv[6], O_RDONLY)) < 0) {
data/cups-bjnp-2.0.3/bjnp.c:167:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        copies = atoi(argv[4]);
data/cups-bjnp-2.0.3/bjnp.c:244:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                if (atoi(value) > 0) {
data/cups-bjnp-2.0.3/bjnp.c:245:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    contimeout = atoi(value);
data/cups-bjnp-2.0.3/bjnp.c:274:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(portname, "%d", port);
data/cups-bjnp-2.0.3/bjnp.h:92:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char hostname[BJNP_HOST_MAX];     /* hostame, if found, else ip-address */
data/cups-bjnp-2.0.3/bjnp.h:99:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char IEEE1284_id[BJNP_IEEE1284_MAX];  /* IEEE1284 printer id */
data/cups-bjnp-2.0.3/bjnp.h:100:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char model[BJNP_MODEL_MAX];           /* printer make and model */
data/cups-bjnp-2.0.3/bjnp.h:101:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char mac_address[BJNP_SERIAL_MAX];    /* unique serial number (mac_address) */
data/cups-bjnp-2.0.3/bjnp-commands.c:153:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(IEEE1284_id, "");
data/cups-bjnp-2.0.3/bjnp-commands.c:189:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(printer_id, id.udp_identity_response.id, id_len);
data/cups-bjnp-2.0.3/bjnp-debug.c:119:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (i = 0; strlen(logtable[i].string) != 0; i++) {
data/cups-bjnp-2.0.3/bjnp-debug.c:253:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(loglevel, level, 15);
data/cups-bjnp-2.0.3/bjnp-discover.c:451:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(BJNP_BROADCAST_INTERVAL * USLEEP_MS);
data/cups-bjnp-2.0.3/bjnp-discover.c:492:25:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                        strncpy(bjnp_id,  disc_resp.header.BJNP_id, 4);
data/cups-bjnp-2.0.3/bjnp-io.c:347:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
             read(printer->fd, &response,
data/cups-bjnp-2.0.3/bjnp-io.c:388:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                 read(printer->fd, &response.tcp_print_response.accepted,
data/cups-bjnp-2.0.3/bjnp-io.c:444:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(40000);
data/cups-bjnp-2.0.3/bjnp-io.c:504:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(device_id, printer->IEEE1284_id, device_id_size);
data/cups-bjnp-2.0.3/bjnp-io.c:507:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(make_model, printer->model, make_model_size);
data/cups-bjnp-2.0.3/bjnp-io.c:510:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((strlen(make_model) == 0) && (strlen(device_id) == 0)) {
data/cups-bjnp-2.0.3/bjnp-io.c:510:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((strlen(make_model) == 0) && (strlen(device_id) == 0)) {
data/cups-bjnp-2.0.3/bjnp-levels.c:116:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    parameter_str += strlen(token);
data/cups-bjnp-2.0.3/bjnp-levels.c:129:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return strlen(argument);
data/cups-bjnp-2.0.3/bjnp-levels.c:246:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat(marker_colors, ",");
data/cups-bjnp-2.0.3/bjnp-levels.c:249:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat(marker_low_levels, ",");
data/cups-bjnp-2.0.3/bjnp-levels.c:252:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat(marker_high_levels, ",");
data/cups-bjnp-2.0.3/bjnp-levels.c:255:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat(marker_names, ",");
data/cups-bjnp-2.0.3/bjnp-levels.c:258:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat(marker_types, ",");
data/cups-bjnp-2.0.3/bjnp-levels.c:275:13:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
            strcat(marker_levels, ",");
data/cups-bjnp-2.0.3/bjnp-levels.c:322:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    next = p + strlen(sep);
data/cups-bjnp-2.0.3/bjnp-runloop.c:260:29:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                            strncpy(data, dev_id, sizeof(data));
data/cups-bjnp-2.0.3/bjnp-runloop.c:261:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                            datalen = (int) strlen(data);
data/cups-bjnp-2.0.3/bjnp-runloop.c:361:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if ((print_bytes = read(print_fd, print_buffer,
data/cups-bjnp-2.0.3/bjnp-utils.c:151:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len  = strlen(printer_id);
data/cups-bjnp-2.0.3/bjnp-utils.c:165:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strncmp(tok, DES_TOKEN, strlen(DES_TOKEN)) == 0) {
data/cups-bjnp-2.0.3/bjnp-utils.c:166:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strcpy(model, tok + strlen(DES_TOKEN));

ANALYSIS SUMMARY:

Hits = 148
Lines analyzed = 4066 in approximately 0.13 seconds (30400 lines/second)
Physical Source Lines of Code (SLOC) = 2524
Hits@level = [0]  24 [1]  28 [2]  87 [3]   3 [4]  30 [5]   0
Hits@level+ = [0+] 172 [1+] 148 [2+] 120 [3+]  33 [4+]  30 [5+]   0
Hits/KSLOC@level+ = [0+] 68.1458 [1+] 58.6371 [2+] 47.5436 [3+] 13.0745 [4+] 11.8859 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.