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/libapache2-mod-tile-0.5/extra/meta2tile.c Examining data/libapache2-mod-tile-0.5/includes/cache_expire.h Examining data/libapache2-mod-tile-0.5/includes/catch.hpp Examining data/libapache2-mod-tile-0.5/includes/daemon.h Examining data/libapache2-mod-tile-0.5/includes/gen_tile.h Examining data/libapache2-mod-tile-0.5/includes/metatile.h Examining data/libapache2-mod-tile-0.5/includes/mod_tile.h Examining data/libapache2-mod-tile-0.5/includes/parameterize_style.hpp Examining data/libapache2-mod-tile-0.5/includes/protocol.h Examining data/libapache2-mod-tile-0.5/includes/protocol_helper.h Examining data/libapache2-mod-tile-0.5/includes/render_config.h Examining data/libapache2-mod-tile-0.5/includes/render_submit_queue.h Examining data/libapache2-mod-tile-0.5/includes/request_queue.h Examining data/libapache2-mod-tile-0.5/includes/store.h Examining data/libapache2-mod-tile-0.5/includes/store_file.h Examining data/libapache2-mod-tile-0.5/includes/store_file_utils.h Examining data/libapache2-mod-tile-0.5/includes/store_memcached.h Examining data/libapache2-mod-tile-0.5/includes/store_null.h Examining data/libapache2-mod-tile-0.5/includes/store_rados.h Examining data/libapache2-mod-tile-0.5/includes/store_ro_composite.h Examining data/libapache2-mod-tile-0.5/includes/store_ro_http_proxy.h Examining data/libapache2-mod-tile-0.5/includes/sys_utils.h Examining data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c Examining data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.h Examining data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c Examining data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.h Examining data/libapache2-mod-tile-0.5/iniparser3.0b/test/iniexample.c Examining data/libapache2-mod-tile-0.5/iniparser3.0b/test/parse.c Examining data/libapache2-mod-tile-0.5/src/cache_expire.c Examining data/libapache2-mod-tile-0.5/src/convert_meta.c Examining data/libapache2-mod-tile-0.5/src/daemon_compat.c Examining data/libapache2-mod-tile-0.5/src/gen_tile.cpp Examining data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp Examining data/libapache2-mod-tile-0.5/src/metatile.cpp Examining data/libapache2-mod-tile-0.5/src/mod_tile.c Examining data/libapache2-mod-tile-0.5/src/mysql2file.c Examining data/libapache2-mod-tile-0.5/src/parameterize_style.cpp Examining data/libapache2-mod-tile-0.5/src/protocol_helper.c Examining data/libapache2-mod-tile-0.5/src/render_expired.c Examining data/libapache2-mod-tile-0.5/src/render_list.c Examining data/libapache2-mod-tile-0.5/src/render_old.c Examining data/libapache2-mod-tile-0.5/src/render_submit_queue.c Examining data/libapache2-mod-tile-0.5/src/request_queue.c Examining data/libapache2-mod-tile-0.5/src/speedtest.cpp Examining data/libapache2-mod-tile-0.5/src/store.c Examining data/libapache2-mod-tile-0.5/src/store_file.c Examining data/libapache2-mod-tile-0.5/src/store_file_utils.c Examining data/libapache2-mod-tile-0.5/src/store_memcached.c Examining data/libapache2-mod-tile-0.5/src/store_null.c Examining data/libapache2-mod-tile-0.5/src/store_rados.c Examining data/libapache2-mod-tile-0.5/src/store_ro_composite.c Examining data/libapache2-mod-tile-0.5/src/store_ro_http_proxy.c Examining data/libapache2-mod-tile-0.5/src/sys_utils.c Examining data/libapache2-mod-tile-0.5/src/daemon.c FINAL RESULTS: data/libapache2-mod-tile-0.5/extra/meta2tile.c:48: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(copy, path); data/libapache2-mod-tile-0.5/extra/meta2tile.c:164:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%d", target, z); data/libapache2-mod-tile-0.5/extra/meta2tile.c:180:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%d/%d", target, z, tx); data/libapache2-mod-tile-0.5/extra/meta2tile.c:189:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%d/%d/%d.png", target, z, tx, ty); data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:74: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(t,s); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:90:2: [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(l, s); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:237:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", secname); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:465: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(line, strstrip(input_line)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:478: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(section, strstrip(section)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:479: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(section, strlwc(section)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:485: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(key, strstrip(key)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:486: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(key, strlwc(key)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:487: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(value, strstrip(value)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:504: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(key, strstrip(key)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:505: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(key, strlwc(key)); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:600:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s:%s", section, key); data/libapache2-mod-tile-0.5/src/cache_expire.c:118:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(url,"http://%s%s%i/%i/%i.png", host, uri, z,x,y); data/libapache2-mod-tile-0.5/src/daemon.c:524: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(req_slave->xmlname, req->xmlname); data/libapache2-mod-tile-0.5/src/daemon.c:525: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(req_slave->mimetype, req->mimetype); data/libapache2-mod-tile-0.5/src/daemon.c:526: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(req_slave->options, req->options); data/libapache2-mod-tile-0.5/src/daemon.c:729: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(maps[iconf].xmlname, name); data/libapache2-mod-tile-0.5/src/daemon.c:731:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:uri", name); data/libapache2-mod-tile-0.5/src/daemon.c:737: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(maps[iconf].xmluri, ini_uri); data/libapache2-mod-tile-0.5/src/daemon.c:739:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:xml", name); data/libapache2-mod-tile-0.5/src/daemon.c:745: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(maps[iconf].xmlfile, ini_xmlpath); data/libapache2-mod-tile-0.5/src/daemon.c:747:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:host", name); data/libapache2-mod-tile-0.5/src/daemon.c:753: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(maps[iconf].host, ini_hostname); data/libapache2-mod-tile-0.5/src/daemon.c:755:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:htcphost", name); data/libapache2-mod-tile-0.5/src/daemon.c:761: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(maps[iconf].htcpip, ini_htcpip); data/libapache2-mod-tile-0.5/src/daemon.c:763:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:tilesize", name); data/libapache2-mod-tile-0.5/src/daemon.c:771:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:scale", name); data/libapache2-mod-tile-0.5/src/daemon.c:779:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:tiledir", name); data/libapache2-mod-tile-0.5/src/daemon.c:785: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(maps[iconf].tile_dir, ini_tiledir); data/libapache2-mod-tile-0.5/src/daemon.c:787:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:maxzoom", name); data/libapache2-mod-tile-0.5/src/daemon.c:795:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:minzoom", name); data/libapache2-mod-tile-0.5/src/daemon.c:807:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:parameterize_style", name); data/libapache2-mod-tile-0.5/src/daemon.c:813: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(maps[iconf].parameterization, ini_parameterize); data/libapache2-mod-tile-0.5/src/daemon.c:831:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:socketname", name); data/libapache2-mod-tile-0.5/src/daemon.c:834:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:iphostname", name); data/libapache2-mod-tile-0.5/src/daemon.c:837:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:ipport", name); data/libapache2-mod-tile-0.5/src/daemon.c:839:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:num_threads", name); data/libapache2-mod-tile-0.5/src/daemon.c:842:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:tile_dir", name); data/libapache2-mod-tile-0.5/src/daemon.c:845:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s:stats_file", name); data/libapache2-mod-tile-0.5/src/gen_tile.cpp:345: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(maps[iMaxConfigs].xmlname, parentxmlconfig[iMaxConfigs].xmlname); data/libapache2-mod-tile-0.5/src/gen_tile.cpp:346: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(maps[iMaxConfigs].xmlfile, parentxmlconfig[iMaxConfigs].xmlfile); data/libapache2-mod-tile-0.5/src/gen_tile.cpp:379: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(maps[iMaxConfigs].xmluri, parentxmlconfig[iMaxConfigs].xmluri); data/libapache2-mod-tile-0.5/src/gen_tile.cpp:380: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(maps[iMaxConfigs].host, parentxmlconfig[iMaxConfigs].host); data/libapache2-mod-tile-0.5/src/gen_tile.cpp:381: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(maps[iMaxConfigs].htcphost, parentxmlconfig[iMaxConfigs].htcpip); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:587:21: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int ret = system("./renderd -h"); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:594:21: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int ret = system("./renderd --doesnotexit"); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:601:21: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int ret = system("./renderd -doesnotexit"); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:619:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tile_dir,"%s/mod_tile_test",tmp); data/libapache2-mod-tile-0.5/src/mod_tile.c:86:42: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf, 2, 3))); data/libapache2-mod-tile-0.5/src/mod_tile.c:97: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(msg, 1000, format, ap); data/libapache2-mod-tile-0.5/src/mod_tile.c:1362: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(cmd->xmlname, tile_config->xmlname); data/libapache2-mod-tile-0.5/src/mod_tile.c:1363: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(cmd->mimetype, tile_config->mimeType); data/libapache2-mod-tile-0.5/src/mod_tile.c:1364: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(cmd->options,parameters); data/libapache2-mod-tile-0.5/src/mod_tile.c:1780: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(filename, RENDERD_CONFIG); data/libapache2-mod-tile-0.5/src/mod_tile.c:1782: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(filename, conffile); data/libapache2-mod-tile-0.5/src/mod_tile.c:1848: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(url, value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1869: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(description, value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1874: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(attribution, value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1879: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(cors, value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1893: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(hostnames[noHostnames - 1], value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1991:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(veryold_threshold_string, "%" SCNd64, &veryold_threshold) != 1) { data/libapache2-mod-tile-0.5/src/mysql2file.c:135:7: [4] (format) snprintf: 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. snprintf(path, PATH_MAX, WWW_ROOT TILE_PATH "/%lu/%lu/%lu.png", z, x, y); data/libapache2-mod-tile-0.5/src/speedtest.cpp:143: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(cmd.xmlname, map); data/libapache2-mod-tile-0.5/src/store.c:36: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(msg, 1000, format, ap); data/libapache2-mod-tile-0.5/src/store_file_utils.c:101:5: [4] (format) snprintf: 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. snprintf(path, len, TILE_PATH "/%s/%d/%d/%d.png", xmlconfig, z, x, y); data/libapache2-mod-tile-0.5/src/store_file_utils.c:140:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. n = sscanf(path, TILE_PATH "/%40[^/]/%d/%d/%d", xmlconfig, pz, px, py); data/libapache2-mod-tile-0.5/src/store_ro_http_proxy.c:128: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(ctx->cache.xmlname,xmlconfig); data/libapache2-mod-tile-0.5/extra/meta2tile.c:353:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "vhb:m:z:", long_options, &option_index); data/libapache2-mod-tile-0.5/src/convert_meta.c:117:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "uhvz:Z:m:t:", long_options, &option_index); data/libapache2-mod-tile-0.5/src/daemon.c:645:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hfc:", long_options, &option_index); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:614:11: [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. tmp = getenv("TMPDIR"); data/libapache2-mod-tile-0.5/src/render_expired.c:159:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hvz:Z:s:m:t:n:l:T:d:", long_options, &option_index); data/libapache2-mod-tile-0.5/src/render_list.c:97:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hvaz:Z:x:X:y:Y:s:m:t:n:l:f", long_options, &option_index); data/libapache2-mod-tile-0.5/src/render_old.c:186:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hvz:Z:s:t:n:c:l:T:m:", long_options, &option_index); data/libapache2-mod-tile-0.5/src/speedtest.cpp:193:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hvs:m:", long_options, &option_index); data/libapache2-mod-tile-0.5/extra/meta2tile.c:47: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 copy[PATH_MAX]; data/libapache2-mod-tile-0.5/extra/meta2tile.c:55: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). hash[c]= atoi(slash+1); data/libapache2-mod-tile-0.5/extra/meta2tile.c:64:11: [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). *pz = atoi(slash+1); data/libapache2-mod-tile-0.5/extra/meta2tile.c:109: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 header[4096]; data/libapache2-mod-tile-0.5/extra/meta2tile.c:130:10: [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). fd = open(name, O_RDONLY); data/libapache2-mod-tile-0.5/extra/meta2tile.c:163: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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/extra/meta2tile.c:190:18: [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). output = open(path, O_WRONLY | O_TRUNC | O_CREAT, 0666); data/libapache2-mod-tile-0.5/extra/meta2tile.c:246: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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/extra/meta2tile.c:267:59: [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 (!zoomdone && isdigit(*(entry->d_name)) && atoi(entry->d_name) >= 0 && atoi(entry->d_name) <= MAXZOOM) data/libapache2-mod-tile-0.5/extra/meta2tile.c:267:87: [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 (!zoomdone && isdigit(*(entry->d_name)) && atoi(entry->d_name) >= 0 && atoi(entry->d_name) <= MAXZOOM) data/libapache2-mod-tile-0.5/extra/meta2tile.c:279: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). int z = atoi(entry->d_name); data/libapache2-mod-tile-0.5/extra/meta2tile.c:322: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). int fromz = atoi(token); data/libapache2-mod-tile-0.5/extra/meta2tile.c:323:19: [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). int toz = atoi(token); data/libapache2-mod-tile-0.5/extra/meta2tile.c:327:19: [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). toz = atoi(minus+1); data/libapache2-mod-tile-0.5/includes/catch.hpp:1661: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[bufferSize]; data/libapache2-mod-tile-0.5/includes/catch.hpp:4235:23: [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). m_ofs.open( m_config.outputFilename.c_str() ); data/libapache2-mod-tile-0.5/includes/daemon.h:32: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/includes/daemon.h:33: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 xmlfile[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/daemon.h:34: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 xmluri[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/daemon.h:35: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[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/daemon.h:36: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 htcpip[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/daemon.h: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 tile_dir[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/daemon.h:38: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 parameterization[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/metatile.h:22: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 magic[4]; data/libapache2-mod-tile-0.5/includes/mod_tile.h:77: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/includes/mod_tile.h:78: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 baseuri[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/mod_tile.h: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 fileExtension[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/mod_tile.h: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 mimeType[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/mod_tile.h:108: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 renderd_socket_name[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/mod_tile.h:110: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 tile_dir[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/mod_tile.h:111:2: [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 cache_extended_hostname[PATH_MAX]; data/libapache2-mod-tile-0.5/includes/protocol.h:31: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/includes/protocol.h:32: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 mimetype[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/includes/protocol.h:33: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 options[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/includes/protocol.h:50: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:52: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(newptr, ptr, size); data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:372:2: [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 cval[90] ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:381:3: [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(cval, "%04d", i); data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:386:3: [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(cval, "%04d", i); data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:394:3: [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(cval, "%04d", i); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:53:12: [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 char l[ASCIILINESZ+1]; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:83:12: [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 char l[ASCIILINESZ+1]; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:216: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 keym[ASCIILINESZ+1]; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:462: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[ASCIILINESZ+1]; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:533: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 [ASCIILINESZ+1] ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:534: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 section [ASCIILINESZ+1] ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:535: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 key [ASCIILINESZ+1] ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:536: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 [ASCIILINESZ+1] ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:537: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 val [ASCIILINESZ+1] ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:546:13: [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 ((in=fopen(ininame, "r"))==NULL) { data/libapache2-mod-tile-0.5/iniparser3.0b/test/iniexample.c:28:8: [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). ini = fopen("example.ini", "w"); data/libapache2-mod-tile-0.5/src/cache_expire.c:83: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(&buf[idx], "HEAD", 4); data/libapache2-mod-tile-0.5/src/cache_expire.c:91: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(&buf[idx], url, url_len); data/libapache2-mod-tile-0.5/src/cache_expire.c:99: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(&buf[idx], "HTTP/1.1", 8); data/libapache2-mod-tile-0.5/src/convert_meta.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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/convert_meta.c:123:25: [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). minZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/convert_meta.c:130:25: [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). maxZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/convert_meta.c:173: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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/daemon.c:99: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(req->xmlname, "default"); data/libapache2-mod-tile-0.5/src/daemon.c:102: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(req->mimetype,"image/png"); data/libapache2-mod-tile-0.5/src/daemon.c:261: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 tmpName[PATH_MAX]; data/libapache2-mod-tile-0.5/src/daemon.c:275:27: [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). FILE * statfile = fopen(tmpName, "w"); data/libapache2-mod-tile-0.5/src/daemon.c:329: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 portnum[16]; data/libapache2-mod-tile-0.5/src/daemon.c:330: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 ipstring[INET6_ADDRSTRLEN]; data/libapache2-mod-tile-0.5/src/daemon.c:343: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(portnum,"%i", sConfig->ipport); data/libapache2-mod-tile-0.5/src/daemon.c:633: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 config_file_name[PATH_MAX] = RENDERD_CONFIG; data/libapache2-mod-tile-0.5/src/daemon.c:708: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 buffer[PATH_MAX]; data/libapache2-mod-tile-0.5/src/daemon.c:765:40: [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). maps[iconf].tile_px_size = atoi(ini_tilesize); data/libapache2-mod-tile-0.5/src/daemon.c:789:36: [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). maps[iconf].max_zoom = atoi(ini_maxzoom); data/libapache2-mod-tile-0.5/src/daemon.c:797:36: [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). maps[iconf].min_zoom = atoi(ini_minzoom); data/libapache2-mod-tile-0.5/src/daemon.c:940:25: [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). FILE *pidfile = fopen(PIDFILE, "w"); data/libapache2-mod-tile-0.5/src/daemon_compat.c:87: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 (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { data/libapache2-mod-tile-0.5/src/gen_tile.cpp:82: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile.cpp: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 xmlfile[PATH_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile.cpp:87: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 xmluri[PATH_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile.cpp: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile.cpp: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 htcphost[PATH_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile.cpp: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 path[PATH_MAX]; // FIXME: Eats lots of stack space when recursive data/libapache2-mod-tile-0.5/src/gen_tile.cpp:195: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(tmp, "%i", num_threads + 2); data/libapache2-mod-tile-0.5/src/gen_tile.cpp:285: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 filename[PATH_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile.cpp:286: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:70:20: [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). FILE * input = fopen("stderr.out", "r+"); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp: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 buffer[sz]; data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:80:21: [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). FILE * input2 = fopen("stderr.out", "w"); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:91: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(item->req.xmlname,"default"); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:719: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 msg[4096]; data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:735:17: [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(buf, "DEADBEAF %i %i", xx, yy); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:747:17: [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(buf_tmp, "DEADBEAF %i %i", xx, yy); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:763: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 msg[4096]; data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:779:17: [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(buf, "DEADBEAF %i %i", xx, yy); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:794:21: [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(buf_tmp, "DEADBEAF %i %i", xx, yy); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:821:17: [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(buf, "DEADBEAF %i %i", xx, yy); data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:859:17: [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(buf, "DEADBEAF %i %i", xx, yy); data/libapache2-mod-tile-0.5/src/metatile.cpp:74: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(m.magic, META_MAGIC, strlen(META_MAGIC)); data/libapache2-mod-tile-0.5/src/metatile.cpp:100: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(metatilebuffer,&m,sizeof(m)); data/libapache2-mod-tile-0.5/src/metatile.cpp:101: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(metatilebuffer + sizeof(m), &offsets, sizeof(offsets)); data/libapache2-mod-tile-0.5/src/metatile.cpp:106: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(metatilebuffer + offsets[xyz_to_meta_offset(x_ + ox, y_ + oy, z_)].offset, (const void *)tile[ox][oy].data(), tile[ox][oy].size()); data/libapache2-mod-tile-0.5/src/mod_tile.c:114: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 portnum[16]; data/libapache2-mod-tile-0.5/src/mod_tile.c:115: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 ipstring[INET6_ADDRSTRLEN]; data/libapache2-mod-tile-0.5/src/mod_tile.c:131: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(portnum,"%i", scfg->renderd_socket_port); data/libapache2-mod-tile-0.5/src/mod_tile.c:744: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(&(ip.s6_addr[12]), &(sin_addr.s_addr), 4); data/libapache2-mod-tile-0.5/src/mod_tile.c:827: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(&(delayp->users[hashkey].ip_addr), &ip, sizeof(struct in6_addr)); data/libapache2-mod-tile-0.5/src/mod_tile.c:982: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 mtime_str[APR_CTIME_LEN]; data/libapache2-mod-tile-0.5/src/mod_tile.c:983: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 atime_str[APR_CTIME_LEN]; data/libapache2-mod-tile-0.5/src/mod_tile.c:984: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 storage_id[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1119: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(&local_stats, stats, sizeof(stats_data)); data/libapache2-mod-tile-0.5/src/mod_tile.c:1121: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(local_stats.noResp200Layer, stats->noResp200Layer, sizeof(apr_uint64_t) * scfg->configs->nelts); data/libapache2-mod-tile-0.5/src/mod_tile.c:1123: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(local_stats.noResp404Layer, stats->noResp404Layer, sizeof(apr_uint64_t) * scfg->configs->nelts); data/libapache2-mod-tile-0.5/src/mod_tile.c:1164: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 err_msg[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1165: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 id[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1280: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 option[11]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1281: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 extension[256]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1323:13: [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 parameters[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1756: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 filename[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1757: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 url[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1758: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1759: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[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1760: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 key[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1761: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 value[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1763: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 fileExtension[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1764: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 mimeType[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/mod_tile.c:1786:15: [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 ((hini=fopen(filename, "r"))==NULL) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1824:13: [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(fileExtension,"png"); data/libapache2-mod-tile-0.5/src/mod_tile.c:1825:13: [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(mimeType,"image/png"); data/libapache2-mod-tile-0.5/src/mod_tile.c:1888:21: [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(hostnames, hostnames_tmp,sizeof(char *) * noHostnames); data/libapache2-mod-tile-0.5/src/mod_tile.c:1900:27: [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). minzoom = atoi(value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1903:27: [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). maxzoom = atoi(value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1906:28: [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). aspect_x = atoi(value); data/libapache2-mod-tile-0.5/src/mod_tile.c:1909:28: [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). aspect_y = atoi(value); data/libapache2-mod-tile-0.5/src/mysql2file.c:34: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mysql2file.c:85:3: [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 query[255]; data/libapache2-mod-tile-0.5/src/mysql2file.c:108:7: [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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/mysql2file.c:139:12: [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). fd = open(path, O_CREAT | O_WRONLY, 0644); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:19: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 name_replace[256]; data/libapache2-mod-tile-0.5/src/render_expired.c:126: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 name[PATH_MAX]; data/libapache2-mod-tile-0.5/src/render_expired.c:175:28: [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). numThreads=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_expired.c:182:28: [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). deleteFrom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_expired.c:190:27: [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). touchFrom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_expired.c:198:25: [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). minZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_expired.c:205:25: [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). maxZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_expired.c:212:27: [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). maxLoad = atoi(optarg); data/libapache2-mod-tile-0.5/src/render_expired.c:294:13: [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[1024]; data/libapache2-mod-tile-0.5/src/render_list.c:66: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 name[PATH_MAX]; data/libapache2-mod-tile-0.5/src/render_list.c:116:27: [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). maxLoad = atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:119:28: [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). numThreads=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:126:22: [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). minX=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:129:22: [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). maxX=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:132:22: [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). minY=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:135:22: [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). maxY=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:138:25: [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). minZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:145:25: [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). maxZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_list.c:260:17: [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[1024]; data/libapache2-mod-tile-0.5/src/render_old.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 filename[PATH_MAX]; data/libapache2-mod-tile-0.5/src/render_old.c:108: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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/render_old.c:109: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 mapname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/render_old.c:152: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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/render_old.c:160: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 spath[PATH_MAX] = RENDER_SOCKET; data/libapache2-mod-tile-0.5/src/render_old.c:206:28: [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). numThreads=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_old.c:213:33: [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). minZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_old.c:220:25: [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). maxZoom=atoi(optarg); data/libapache2-mod-tile-0.5/src/render_old.c:227:29: [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). max_load = atoi(optarg); data/libapache2-mod-tile-0.5/src/render_old.c:288: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[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/render_old.c:289: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 value[INILINE_MAX]; data/libapache2-mod-tile-0.5/src/render_old.c:292:15: [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 ((hini=fopen(config_file, "r"))==NULL) { data/libapache2-mod-tile-0.5/src/request_queue.c:112:21: [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(&(queue->item_hashidx[key]), nextItem->next, data/libapache2-mod-tile-0.5/src/request_queue.c:365: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(stats, &(queue->stats), sizeof(stats_struct)); data/libapache2-mod-tile-0.5/src/speedtest.cpp:174: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 name[PATH_MAX]; data/libapache2-mod-tile-0.5/src/speedtest.cpp:208:28: [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). numThreads=atoi(optarg); data/libapache2-mod-tile-0.5/src/store_file.c:33: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 filename[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file.c:49: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 path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file.c:58:10: [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). fd = open(path, O_RDONLY); data/libapache2-mod-tile-0.5/src/store_file.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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file.c:170: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file.c:180: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file.c:196:10: [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). fd = open(tmp, O_WRONLY | O_TRUNC | O_CREAT, 0666); data/libapache2-mod-tile-0.5/src/store_file.c:219: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file.c:229: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 name[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file_utils.c:20: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_file_utils.c:92:14: [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 i, hash[5]; data/libapache2-mod-tile-0.5/src/store_file_utils.c:160:14: [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 i, hash[5], offset, mask; data/libapache2-mod-tile-0.5/src/store_memcached.c:51: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_memcached.c:73: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(m, buf_raw + sizeof(struct stat_info), header_len); data/libapache2-mod-tile-0.5/src/store_memcached.c:103: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(buf, buf_raw + file_offset, tile_size); data/libapache2-mod-tile-0.5/src/store_memcached.c:110: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_memcached.c:135: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(&tile_stat,buf, sizeof(struct stat_info)); data/libapache2-mod-tile-0.5/src/store_memcached.c:136: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(m, buf + sizeof(struct stat_info), header_len); data/libapache2-mod-tile-0.5/src/store_memcached.c:152: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_memcached.c:153: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_memcached.c:169: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(buf2, &tile_stat, sizeof(tile_stat)); data/libapache2-mod-tile-0.5/src/store_memcached.c:170: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(buf2 + sizeof(tile_stat), buf, sz); data/libapache2-mod-tile-0.5/src/store_memcached.c:188: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_memcached.c:205: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:38: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:67: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:105: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:126: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(m, buf_raw + sizeof(struct stat_info), header_len); data/libapache2-mod-tile-0.5/src/store_rados.c:184: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(&tile_stat,buf, sizeof(struct stat_info)); data/libapache2-mod-tile-0.5/src/store_rados.c:192: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:200: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:201: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:213: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(buf2, &tile_stat, sizeof(tile_stat)); data/libapache2-mod-tile-0.5/src/store_rados.c:214: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(buf2 + sizeof(tile_stat), buf, sz); data/libapache2-mod-tile-0.5/src/store_rados.c:233: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:234: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:255: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 meta_path[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:256: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[PATH_MAX]; data/libapache2-mod-tile-0.5/src/store_rados.c:325: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(ctx->pool, tmp, i*sizeof(char)); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:28: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/store_ro_composite.c:33: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 xmlconfig_primary[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/store_ro_composite.c:35: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 xmlconfig_secondary[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/store_ro_composite.c:56: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 ((closure->data + closure->pos), data, length); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:71: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 (data, (closure->data + closure->pos), length); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:209: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(connection_string_primary,connection_string + strlen("composite:{"), strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:218: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(ctx->xmlconfig_primary, connection_string_primary, tmp - connection_string_primary); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:229: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(ctx->xmlconfig_secondary, connection_string_secondary, tmp - connection_string_secondary); data/libapache2-mod-tile-0.5/src/store_ro_http_proxy.c:30: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 xmlname[XMLCONFIG_MAX]; data/libapache2-mod-tile-0.5/src/store_ro_http_proxy.c:55:3: [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(&(chunk->memory[chunk->size]), contents, realsize); data/libapache2-mod-tile-0.5/src/store_ro_http_proxy.c:141: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(buf, ctx->cache.tile, ctx->cache.st_stat.size); data/libapache2-mod-tile-0.5/src/sys_utils.c:20:21: [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). FILE *loadavg = fopen("/proc/loadavg", "r"); data/libapache2-mod-tile-0.5/extra/meta2tile.c:149:38: [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 (memcmp(m->magic, META_MAGIC, strlen(META_MAGIC))) data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:72: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). t = malloc(strlen(s)+1) ; data/libapache2-mod-tile-0.5/iniparser3.0b/src/dictionary.c:100:8: [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(key); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:91:13: [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). last = l + strlen(l); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:235:24: [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). seclen = (int)strlen(secname); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:466: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). len = (int)strlen(line); data/libapache2-mod-tile-0.5/iniparser3.0b/src/iniparser.c:565:20: [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 = (int)strlen(line)-1; data/libapache2-mod-tile-0.5/src/cache_expire.c:46:15: [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). url_len = strlen(url); data/libapache2-mod-tile-0.5/src/daemon.c:103:9: [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(req->options,""); data/libapache2-mod-tile-0.5/src/daemon.c:399:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addrU->sun_path, sConfig->socketname, sizeof(addrU->sun_path) - 1); data/libapache2-mod-tile-0.5/src/daemon.c:451:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addrU.sun_path, sConfig->socketname, sizeof(addrU.sun_path) - 1); data/libapache2-mod-tile-0.5/src/daemon.c:455:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). old = umask(0); // Need daemon socket to be writeable by apache data/libapache2-mod-tile-0.5/src/daemon.c:461:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(old); data/libapache2-mod-tile-0.5/src/daemon.c:654:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(config_file_name, optarg, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/daemon.c:724: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). if (strlen(name) >= (XMLCONFIG_MAX - 1)) { data/libapache2-mod-tile-0.5/src/daemon.c:733: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). if (strlen(ini_uri) >= (PATH_MAX - 1)) { data/libapache2-mod-tile-0.5/src/daemon.c:741: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). if (strlen(ini_xmlpath) >= (PATH_MAX - 1)){ data/libapache2-mod-tile-0.5/src/daemon.c:749: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). if (strlen(ini_hostname) >= (PATH_MAX - 1)) { data/libapache2-mod-tile-0.5/src/daemon.c:757: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). if (strlen(ini_htcpip) >= (PATH_MAX - 1)) { data/libapache2-mod-tile-0.5/src/daemon.c:781: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). if (strlen(ini_tiledir) >= (PATH_MAX - 1)) { data/libapache2-mod-tile-0.5/src/daemon.c:809: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). if (strlen(ini_parameterize) >= (PATH_MAX - 1)) { data/libapache2-mod-tile-0.5/src/gen_tile.cpp:382: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). if (strlen(maps[iMaxConfigs].htcphost) > 0) { data/libapache2-mod-tile-0.5/src/gen_tile_test.cpp:618:48: [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). tile_dir = (char *) malloc(sizeof(char) * (strlen(tmp) + 15)); data/libapache2-mod-tile-0.5/src/metatile.cpp:74: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). memcpy(m.magic, META_MAGIC, strlen(META_MAGIC)); data/libapache2-mod-tile-0.5/src/mod_tile.c:186:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, scfg->renderd_socket_name, sizeof(addr.sun_path) - sizeof(char)); data/libapache2-mod-tile-0.5/src/mod_tile.c:1062:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(buf,"\t\t\"", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1062:38: [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). strncat(buf,"\t\t\"", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1063:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf,tile_config->hostnames[i], 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1063:55: [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). strncat(buf,tile_config->hostnames[i], 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1064:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf,tile_config->baseuri,8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1064:49: [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). strncat(buf,tile_config->baseuri,8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1065:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(buf,"{z}/{x}/{y}.",8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1065:43: [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). strncat(buf,"{z}/{x}/{y}.",8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1066:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf,tile_config->fileExtension, 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1066:56: [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). strncat(buf,tile_config->fileExtension, 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1067:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(buf,"\"", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1067:34: [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). strncat(buf,"\"", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1068:47: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. if (i < tile_config->noHostnames - 1) strncat(buf,",", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1068:71: [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 (i < tile_config->noHostnames - 1) strncat(buf,",", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1069:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(buf,"\n", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1069:34: [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). strncat(buf,"\n", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1071:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(buf,"\t]\n}\n", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1071:36: [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). strncat(buf,"\t]\n}\n", 8*1024-strlen(buf)-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1072:11: [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(buf); data/libapache2-mod-tile-0.5/src/mod_tile.c:1295: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 (!strncmp("/mod_tile", r->uri, strlen("/mod_tile"))) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1309:52: [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(tile_config->baseuri, r->uri, strlen(tile_config->baseuri))) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1315:35: [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(r->uri + strlen(tile_config->baseuri),"tile-layer.json", strlen("tile-layer.json"))) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1315:83: [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(r->uri + strlen(tile_config->baseuri),"tile-layer.json", strlen("tile-layer.json"))) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1326:21: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. n = sscanf(r->uri+strlen(tile_config->baseuri),"%40[^/]/%d/%d/%d.%255[a-z]/%10s", parameters,&(cmd->z), &(cmd->x), &(cmd->y), extension, option); data/libapache2-mod-tile-0.5/src/mod_tile.c:1326:35: [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). n = sscanf(r->uri+strlen(tile_config->baseuri),"%40[^/]/%d/%d/%d.%255[a-z]/%10s", parameters,&(cmd->z), &(cmd->x), &(cmd->y), extension, option); data/libapache2-mod-tile-0.5/src/mod_tile.c:1333:21: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. n = sscanf(r->uri+strlen(tile_config->baseuri),"%d/%d/%d.%255[a-z]/%10s", &(cmd->z), &(cmd->x), &(cmd->y), extension, option); data/libapache2-mod-tile-0.5/src/mod_tile.c:1333:35: [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). n = sscanf(r->uri+strlen(tile_config->baseuri),"%d/%d/%d.%255[a-z]/%10s", &(cmd->z), &(cmd->x), &(cmd->y), extension, option); data/libapache2-mod-tile-0.5/src/mod_tile.c:1665:9: [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(name) == 0) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1673:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(hostnames[0],"http://", PATH_MAX); data/libapache2-mod-tile-0.5/src/mod_tile.c:1678:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hostnames[0],"localhost",PATH_MAX-10); data/libapache2-mod-tile-0.5/src/mod_tile.c:1680:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(hostnames[0],cmd->server->server_hostname,PATH_MAX-strlen(hostnames[0])-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1680:72: [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). strncat(hostnames[0],cmd->server->server_hostname,PATH_MAX-strlen(hostnames[0])-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1704:14: [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). urilen = strlen(baseuri); data/libapache2-mod-tile-0.5/src/mod_tile.c:1713:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tilecfg->xmlname, name, XMLCONFIG_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1714:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tilecfg->fileExtension, fileExtension, XMLCONFIG_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1715:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tilecfg->mimeType, mimeType, XMLCONFIG_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:1779:9: [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(conffile) == 0) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1793:18: [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 (line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0; data/libapache2-mod-tile-0.5/src/mod_tile.c:1793:48: [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 (line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0; data/libapache2-mod-tile-0.5/src/mod_tile.c:1804: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). if (strlen(line) >= XMLCONFIG_MAX) { data/libapache2-mod-tile-0.5/src/mod_tile.c:1823:13: [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(url,""); data/libapache2-mod-tile-0.5/src/mod_tile.c:1841:21: [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(value) >= PATH_MAX){ data/libapache2-mod-tile-0.5/src/mod_tile.c:1851:21: [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(value) >= PATH_MAX){ data/libapache2-mod-tile-0.5/src/mod_tile.c:1868:54: [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). description = malloc(sizeof(char) * (strlen(value) + 1)); data/libapache2-mod-tile-0.5/src/mod_tile.c:1873:54: [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). attribution = malloc(sizeof(char) * (strlen(value) + 1)); data/libapache2-mod-tile-0.5/src/mod_tile.c:1878:47: [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). cors = malloc(sizeof(char) * (strlen(value) + 1)); data/libapache2-mod-tile-0.5/src/mod_tile.c:1892:67: [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). hostnames[noHostnames - 1] = malloc(sizeof(char)*(strlen(value) + 1)); data/libapache2-mod-tile-0.5/src/mod_tile.c:2003:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->renderd_socket_name, renderd_socket_name_string, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2012:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->renderd_socket_name, renderd_socket_address_string, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2024:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->tile_dir, tile_dir_string, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2032:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->cache_extended_hostname, cache_extended_hostname, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2216:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->renderd_socket_name, RENDER_SOCKET, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2219:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->tile_dir, HASH_PATH, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2257:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->renderd_socket_name, scfg_over->renderd_socket_name, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2260:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->tile_dir, scfg_over->tile_dir, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mod_tile.c:2262:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(scfg->cache_extended_hostname, scfg_over->cache_extended_hostname, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/mysql2file.c:37:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, path, sizeof(tmp)); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:25:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(name_replace, ", coalesce(", 255); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:28:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(name_replace,"name,", 255); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:30:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(name_replace,"tags->'name:", 255); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:31:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(name_replace, tok, 255); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:32:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(name_replace,"',", 255); data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:38:18: [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). name_replace[strlen(name_replace) - 1] = 0; data/libapache2-mod-tile-0.5/src/parameterize_style.cpp:39:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(name_replace,") as name", 255); data/libapache2-mod-tile-0.5/src/render_old.c:192:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(spath, optarg, PATH_MAX-1); data/libapache2-mod-tile-0.5/src/render_old.c:304:21: [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(line) >= XMLCONFIG_MAX){ data/libapache2-mod-tile-0.5/src/render_submit_queue.c:133:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmd->xmlname, qHead->mapname, XMLCONFIG_MAX - 1); data/libapache2-mod-tile-0.5/src/render_submit_queue.c:207:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, spath, sizeof(addr.sun_path) - 1); data/libapache2-mod-tile-0.5/src/store.c:68:9: [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(options) == 0) { data/libapache2-mod-tile-0.5/src/store_file.c:68:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int got = read(fd, ((unsigned char *) m) + pos, len); data/libapache2-mod-tile-0.5/src/store_file.c:86:38: [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 (memcmp(m->magic, META_MAGIC, strlen(META_MAGIC))) { data/libapache2-mod-tile-0.5/src/store_file.c:87:53: [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 (memcmp(m->magic, META_MAGIC_COMPRESSED, strlen(META_MAGIC_COMPRESSED))) { data/libapache2-mod-tile-0.5/src/store_file.c:126:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int got = read(fd, buf + pos, len); data/libapache2-mod-tile-0.5/src/store_file.c:187: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). tmp = malloc(sizeof(char) * strlen(meta_path) + 24); data/libapache2-mod-tile-0.5/src/store_file.c:188:19: [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). snprintf(tmp, strlen(meta_path) + 24, "%s.%lu", meta_path, pthread_self()); data/libapache2-mod-tile-0.5/src/store_file_utils.c:23:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, path, sizeof(tmp) - 1); data/libapache2-mod-tile-0.5/src/store_file_utils.c:175:9: [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(options)) { data/libapache2-mod-tile-0.5/src/store_file_utils.c:181:9: [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(options)) { data/libapache2-mod-tile-0.5/src/store_memcached.c:36:9: [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(options)) { data/libapache2-mod-tile-0.5/src/store_memcached.c:66:60: [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). buf_raw = memcached_get(store->storage_ctx, meta_path, strlen(meta_path), &len, &flags, &rc); data/libapache2-mod-tile-0.5/src/store_memcached.c:75:38: [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 (memcmp(m->magic, META_MAGIC, strlen(META_MAGIC))) { data/libapache2-mod-tile-0.5/src/store_memcached.c:76:53: [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 (memcmp(m->magic, META_MAGIC_COMPRESSED, strlen(META_MAGIC_COMPRESSED))) { data/libapache2-mod-tile-0.5/src/store_memcached.c:123:56: [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). buf = memcached_get(store->storage_ctx, meta_path, strlen(meta_path), &len, &flags, &rc); data/libapache2-mod-tile-0.5/src/store_memcached.c:176:55: [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). rc = memcached_set(store->storage_ctx, meta_path, strlen(meta_path), buf2, sz2, (time_t)0, (uint32_t)0); data/libapache2-mod-tile-0.5/src/store_memcached.c:194:58: [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). rc = memcached_delete(store->storage_ctx, meta_path, strlen(meta_path), 0); data/libapache2-mod-tile-0.5/src/store_memcached.c:214:56: [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). buf = memcached_get(store->storage_ctx, meta_path, strlen(meta_path), &len, &flags, &rc); data/libapache2-mod-tile-0.5/src/store_memcached.c:223:55: [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). rc = memcached_cas(store->storage_ctx, meta_path, strlen(meta_path), buf, len, 0, flags, cas); data/libapache2-mod-tile-0.5/src/store_memcached.c:254: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). ctx = memcached(connection_str, strlen(connection_str)); data/libapache2-mod-tile-0.5/src/store_rados.c:55:9: [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(options)) { data/libapache2-mod-tile-0.5/src/store_rados.c:97:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctx->metadata_cache.xmlname, xmlconfig, XMLCONFIG_MAX - 1); data/libapache2-mod-tile-0.5/src/store_rados.c:128:38: [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 (memcmp(m->magic, META_MAGIC, strlen(META_MAGIC))) { data/libapache2-mod-tile-0.5/src/store_rados.c:129:53: [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 (memcmp(m->magic, META_MAGIC_COMPRESSED, strlen(META_MAGIC_COMPRESSED))) { data/libapache2-mod-tile-0.5/src/store_rados.c:321:31: [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). tmp = &(connection_string[strlen("rados://")]); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:208:40: [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). connection_string_primary = malloc(strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary) + 1); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:208:68: [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). connection_string_primary = malloc(strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary) + 1); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:208:92: [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). connection_string_primary = malloc(strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary) + 1); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:209:58: [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). memcpy(connection_string_primary,connection_string + strlen("composite:{"), strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:209:81: [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). memcpy(connection_string_primary,connection_string + strlen("composite:{"), strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:209:109: [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). memcpy(connection_string_primary,connection_string + strlen("composite:{"), strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:209:133: [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). memcpy(connection_string_primary,connection_string + strlen("composite:{"), strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)); data/libapache2-mod-tile-0.5/src/store_ro_composite.c:210:31: [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). connection_string_primary[strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)] = 0; data/libapache2-mod-tile-0.5/src/store_ro_composite.c:210:59: [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). connection_string_primary[strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)] = 0; data/libapache2-mod-tile-0.5/src/store_ro_composite.c:210:83: [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). connection_string_primary[strlen(connection_string) - strlen("composite:{") - strlen(connection_string_secondary)] = 0; data/libapache2-mod-tile-0.5/src/store_ro_composite.c:212: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). connection_string_secondary[strlen(connection_string_secondary) - 1] = 0; data/libapache2-mod-tile-0.5/src/store_ro_http_proxy.c:229:47: [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). ctx->baseurl = strdup(&(connection_string[strlen("ro_http_proxy://")])); ANALYSIS SUMMARY: Hits = 428 Lines analyzed = 19054 in approximately 0.68 seconds (28158 lines/second) Physical Source Lines of Code (SLOC) = 14501 Hits@level = [0] 514 [1] 130 [2] 219 [3] 8 [4] 71 [5] 0 Hits@level+ = [0+] 942 [1+] 428 [2+] 298 [3+] 79 [4+] 71 [5+] 0 Hits/KSLOC@level+ = [0+] 64.961 [1+] 29.5152 [2+] 20.5503 [3+] 5.4479 [4+] 4.89621 [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.