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/maqview-0.2.5/inftrees.c Examining data/maqview-0.2.5/inffixed.h Examining data/maqview-0.2.5/stdhashc.cc Examining data/maqview-0.2.5/uncompr.c Examining data/maqview-0.2.5/zutil.h Examining data/maqview-0.2.5/inflate.c Examining data/maqview-0.2.5/kstream.h Examining data/maqview-0.2.5/gl_gui.c Examining data/maqview-0.2.5/socket_view.h Examining data/maqview-0.2.5/compress.c Examining data/maqview-0.2.5/zlib.h Examining data/maqview-0.2.5/deflate.c Examining data/maqview-0.2.5/zrio_main.c Examining data/maqview-0.2.5/zconf.h Examining data/maqview-0.2.5/zrio.h Examining data/maqview-0.2.5/btree.h Examining data/maqview-0.2.5/test_razf.c Examining data/maqview-0.2.5/view_goto.c Examining data/maqview-0.2.5/gzio.c Examining data/maqview-0.2.5/infback.c Examining data/maqview-0.2.5/crc32.c Examining data/maqview-0.2.5/cns_cache.c Examining data/maqview-0.2.5/maqmap_index_main.c Examining data/maqview-0.2.5/caches.h Examining data/maqview-0.2.5/crc32.h Examining data/maqview-0.2.5/const.h Examining data/maqview-0.2.5/inftrees.h Examining data/maqview-0.2.5/inflate.h Examining data/maqview-0.2.5/deflate.h Examining data/maqview-0.2.5/MainFrame.c Examining data/maqview-0.2.5/adler32.c Examining data/maqview-0.2.5/zutil.c Examining data/maqview-0.2.5/const.c Examining data/maqview-0.2.5/gl_gui.h Examining data/maqview-0.2.5/read_cache.c Examining data/maqview-0.2.5/maqmap_index.h Examining data/maqview-0.2.5/zrio.c Examining data/maqview-0.2.5/view_panel.c Examining data/maqview-0.2.5/trees.c Examining data/maqview-0.2.5/maqmap.h Examining data/maqview-0.2.5/trees.h Examining data/maqview-0.2.5/maqmap_index.c Examining data/maqview-0.2.5/stdhashc.h Examining data/maqview-0.2.5/btree.c Examining data/maqview-0.2.5/inffast.h Examining data/maqview-0.2.5/maqview.h Examining data/maqview-0.2.5/inffast.c Examining data/maqview-0.2.5/socket_view.c FINAL RESULTS: data/maqview-0.2.5/cns_cache.c:144: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(index_name, filename); data/maqview-0.2.5/cns_cache.c:189: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(index_name, filename); data/maqview-0.2.5/cns_cache.c:203:3: [4] (buffer) fscanf: 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. fscanf(file, "REF_NAME:%s\n", cns->ref_name[i]); data/maqview-0.2.5/gl_gui.c:184: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(str, option); data/maqview-0.2.5/gzio.c:131:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s->path, path); /* do this early for debugging */ data/maqview-0.2.5/gzio.c:613:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. (void)vsprintf(buf, format, va); data/maqview-0.2.5/gzio.c:618:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(buf, format, va); data/maqview-0.2.5/gzio.c:623:11: [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. (void)vsnprintf(buf, sizeof(buf), format, va); data/maqview-0.2.5/gzio.c:627:11: [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. len = vsnprintf(buf, sizeof(buf), format, va); data/maqview-0.2.5/gzio.c:650:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, data/maqview-0.2.5/gzio.c:655:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, data/maqview-0.2.5/gzio.c:660: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(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, data/maqview-0.2.5/gzio.c:664:11: [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. len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, data/maqview-0.2.5/gzio.c:1008:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s->msg, s->path); data/maqview-0.2.5/gzio.c:1010:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(s->msg, m); data/maqview-0.2.5/maqmap_index.c:165: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(index_name, filename); data/maqview-0.2.5/maqmap_index.c:188: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(index_name, filename); data/maqview-0.2.5/maqmap_index.c:279: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(index_name, filename); data/maqview-0.2.5/view_goto.c:44: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(view->map_file, map_file); data/maqview-0.2.5/view_goto.c:131: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(view->cns_file, cns_name); data/maqview-0.2.5/view_panel.c:876:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->msg_string, "Input:[%s_]", str); data/maqview-0.2.5/view_panel.c:879:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->msg_string, "%s:[%s_]", vp->err_string, vp->view_string); data/maqview-0.2.5/view_panel.c:884:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->msg_string, "Ref[%s] Position[%ld-%ld] Caching[%ld-%ld] Cacheing seqs[%ld-%ld]", data/maqview-0.2.5/view_panel.c:1120:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Refs[%s] %ld", refs->cache->index->mm->ref_name[refs->show_id], refs->show_start + id + 1); data/maqview-0.2.5/view_panel.c:1132:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Read: %ld|%c|%s[%d]|%c %d", read_pos(read->read.pos) + 1, data/maqview-0.2.5/view_panel.c:1136:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Read: %ld|%c|%s", read_pos(read->read.pos) + 1, data/maqview-0.2.5/view_panel.c:1291:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Cannot open view %s", vp->view_string); data/maqview-0.2.5/view_panel.c:1296:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "set view to %s", vp->view_string); data/maqview-0.2.5/view_panel.c:1621:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Switch to ref seq [%s]", vp->view->refs.cache->index->mm->ref_name[i]); data/maqview-0.2.5/view_panel.c:1623:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Cannot switch: only one ref seq [%s]", data/maqview-0.2.5/view_panel.c:1633:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Switch to ref seq [%s]", vp->view->refs.cache->index->mm->ref_name[i]); data/maqview-0.2.5/view_panel.c:1639:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(vp->err_string, "Cannot switch: only one ref seq [%s]", data/maqview-0.2.5/zrio.c:49: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(accname, filename); data/maqview-0.2.5/zrio.c:317:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if(zr->access){ data/maqview-0.2.5/zrio.c:319:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. free(zr->access); data/maqview-0.2.5/zrio.c:379:24: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void free_index(struct access *index) data/maqview-0.2.5/zrio.c:389:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *addpoint(struct access *index, int bits, data/maqview-0.2.5/zrio.c:389:32: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *addpoint(struct access *index, int bits, data/maqview-0.2.5/zrio.c:396:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. index = malloc(sizeof(struct access)); data/maqview-0.2.5/zrio.c:456:46: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int build_index(int in, int64_t span, struct access **built, void (*notify)(void *obj, unsigned char *buf, int buf_size, int64_t pos), void *obj) data/maqview-0.2.5/zrio.c:461:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *index; /* access points being generated */ data/maqview-0.2.5/zrio.c:573: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(accname, filename); data/maqview-0.2.5/zrio.h:21:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. typedef struct access { data/maqview-0.2.5/zrio.h:29:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. Access *access; data/maqview-0.2.5/zutil.h:199:18: [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. # if !defined(vsnprintf) && !defined(NO_vsnprintf) data/maqview-0.2.5/zutil.h:200:15: [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. # define vsnprintf _vsnprintf data/maqview-0.2.5/zutil.h:246:39: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Trace(x) {if (z_verbose>=0) fprintf x ;} data/maqview-0.2.5/zutil.h:247:39: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracev(x) {if (z_verbose>0) fprintf x ;} data/maqview-0.2.5/zutil.h:248:40: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracevv(x) {if (z_verbose>1) fprintf x ;} data/maqview-0.2.5/zutil.h:249:48: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} data/maqview-0.2.5/zutil.h:250:49: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} data/maqview-0.2.5/MainFrame.c:194:13: [3] (buffer) getopt: 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. while((c = getopt(argc, argv, "c:w:h:")) >= 0){ data/maqview-0.2.5/maqmap_index_main.c:103:14: [3] (buffer) getopt: 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. while ((c = getopt(argc, argv, "l:c:ivb")) >= 0) { data/maqview-0.2.5/socket_view.c:447:6: [3] (buffer) getopt: 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(argc, argv, "sc"); data/maqview-0.2.5/MainFrame.c:197: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). case 'w': win_width = atoi(optarg); break; data/maqview-0.2.5/MainFrame.c:198: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). case 'h': win_height = atoi(optarg); break; data/maqview-0.2.5/MainFrame.c:214: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(location, argv[optind+1], n + 1); data/maqview-0.2.5/btree.c:376:9: [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 = fopen("test.idx", "w+"); data/maqview-0.2.5/cns_cache.c:9:11: [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 buf[1024]; data/maqview-0.2.5/cns_cache.c:18:4: [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(target, obj->buf, size);\ data/maqview-0.2.5/cns_cache.c:22: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(target, obj->buf, obj->buf_size);\ data/maqview-0.2.5/cns_cache.c:23: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(target + obj->buf_size, buf, size - obj->buf_size);\ data/maqview-0.2.5/cns_cache.c:28: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(obj->buf + obj->buf_size, buf, buf_size);\ data/maqview-0.2.5/cns_cache.c:33:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(buf_size) memcpy(obj->buf, buf, buf_size);\ data/maqview-0.2.5/cns_cache.c:37:4: [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(target, buf, size);\ data/maqview-0.2.5/cns_cache.c:44:4: [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(target, obj->buf, size); data/maqview-0.2.5/cns_cache.c:48: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(target, obj->buf, obj->buf_size); data/maqview-0.2.5/cns_cache.c:49: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(target + obj->buf_size, *buf_ptr, size - obj->buf_size); data/maqview-0.2.5/cns_cache.c:54: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(obj->buf + obj->buf_size, *buf_ptr, *buf_size_ptr); data/maqview-0.2.5/cns_cache.c:59:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(*buf_size_ptr) memcpy(obj->buf, *buf_ptr, *buf_size_ptr); data/maqview-0.2.5/cns_cache.c:63:4: [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(target, *buf_ptr, size); data/maqview-0.2.5/cns_cache.c:145:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(index_name, ".summary"); data/maqview-0.2.5/cns_cache.c:146: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((file = fopen(index_name, "w")) == NULL){ free(index_name); close_cns_cache(cache); return NULL; } data/maqview-0.2.5/cns_cache.c:190:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(index_name, ".summary"); data/maqview-0.2.5/cns_cache.c:191: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((file = fopen(index_name, "r")) == NULL){ free(index_name); return NULL; } data/maqview-0.2.5/const.c:24:10: [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 nst_nt16_table[256] = { data/maqview-0.2.5/crc32.c:161: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). out = fopen("crc32.h", "w"); data/maqview-0.2.5/gl_gui.c:12:2: [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(win->bgColor, default_colors[0], 3 * sizeof(float)); data/maqview-0.2.5/gl_gui.c:13:2: [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(win->textColor, default_colors[1], 3 * sizeof(float)); data/maqview-0.2.5/gl_gui.c:14:2: [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(win->borderColor, default_colors[2], 3 * sizeof(float)); data/maqview-0.2.5/gl_gui.c:15:2: [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(win->highlightTextColor, default_colors[3], 3 * sizeof(float)); data/maqview-0.2.5/gl_gui.c:16:2: [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(win->highlightBgColor, default_colors[4], 3 * sizeof(float)); data/maqview-0.2.5/gzio.c:103: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 fmode[80]; /* copy of mode, without the compression level */ data/maqview-0.2.5/gzio.c:223: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[46]; /* allow for up to 128-bit integers */ data/maqview-0.2.5/gzio.c:226:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "<fd:%d>", fd); /* for debugging */ data/maqview-0.2.5/gzio.c:605: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 buf[Z_PRINTF_BUFSIZE]; data/maqview-0.2.5/gzio.c:644: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 buf[Z_PRINTF_BUFSIZE]; data/maqview-0.2.5/gzio.c:1009:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(s->msg, ": "); data/maqview-0.2.5/inflate.c:577: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 hbuf[4]; /* buffer for gzip header crc calculation */ data/maqview-0.2.5/inflate.c:1182: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 hbuf[4]; /* buffer for gzip header crc calculation */ data/maqview-0.2.5/inflate.c:1881: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 buf[4]; /* to restore bit buffer to byte string */ data/maqview-0.2.5/kstream.h:109:4: [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(str->s + str->l, ks->buf + ks->begin, i - ks->begin); \ data/maqview-0.2.5/maqmap.h:48: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 name[MAX_NAMELEN]; data/maqview-0.2.5/maqmap_index.c:12:11: [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 buf[1024]; // I never expect ref_name[x] exceed this length data/maqview-0.2.5/maqmap_index.c:20:4: [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(target, obj->buf, size);\ data/maqview-0.2.5/maqmap_index.c:24: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(target, obj->buf, obj->buf_size);\ data/maqview-0.2.5/maqmap_index.c:25: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(target + obj->buf_size, buf, size - obj->buf_size);\ data/maqview-0.2.5/maqmap_index.c:30: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(obj->buf + obj->buf_size, buf, buf_size);\ data/maqview-0.2.5/maqmap_index.c:35:4: [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(obj->buf, buf, buf_size);\ data/maqview-0.2.5/maqmap_index.c:39:4: [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(target, buf, size);\ data/maqview-0.2.5/maqmap_index.c:94:4: [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(obj->buf + obj->buf_size, buf, sizeof(maplet) - obj->buf_size); data/maqview-0.2.5/maqmap_index.c:120: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(obj->buf + obj->buf_size, buf, buf_size); data/maqview-0.2.5/maqmap_index.c:166:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(index_name, ".vm"); data/maqview-0.2.5/maqmap_index.c:189:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(index_name, ".vm"); data/maqview-0.2.5/maqmap_index.c:280:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(index_name, ".vm"); data/maqview-0.2.5/maqmap_index.c:418:2: [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(string, "%ld", number); data/maqview-0.2.5/maqmap_index.c:444:10: [2] (integer) atol: 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). rs += atol(str); data/maqview-0.2.5/maqmap_index.c:456:9: [2] (integer) atol: 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). rs += atol(str); data/maqview-0.2.5/maqmap_index_main.c:54: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). *begin = atoi(p); data/maqview-0.2.5/maqmap_index_main.c:57:10: [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). *end = atoi(p); data/maqview-0.2.5/maqmap_index_main.c:105: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). case 'l': level = atoi(optarg); break; data/maqview-0.2.5/maqview.h:245: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 view_string[120]; data/maqview-0.2.5/maqview.h:249: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 err_string[120]; data/maqview-0.2.5/maqview.h:252: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 msg_string[120]; data/maqview-0.2.5/read_cache.c:32:30: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define let2read(let, reads) memcpy(&((reads)->read), let, sizeof(maplet)); (reads)->flag = 0; (reads)->y = 0 data/maqview-0.2.5/socket_view.c:451: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). if(argc > optind) port = atoi(argv[optind++]); data/maqview-0.2.5/socket_view.c:468: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). if(argc > optind) port = atoi(argv[optind++]); data/maqview-0.2.5/socket_view.c:470:30: [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(argc > optind) ref_id = atoi(argv[optind++]); data/maqview-0.2.5/socket_view.c:472:29: [2] (integer) atol: 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(argc > optind) start = atol(argv[optind++]) - 1; data/maqview-0.2.5/socket_view.c:474:29: [2] (integer) atol: 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(argc > optind) end = atol(argv[optind++]) - 1; data/maqview-0.2.5/test_razf.c:8: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). RAZF *rz = razf_open_r(open(argv[1], O_RDONLY)); data/maqview-0.2.5/trees.c:332: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 *header = fopen("trees.h", "w"); data/maqview-0.2.5/view_goto.c:76:2: [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(view->bgColor.rgb, mv_color_bg, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:77:2: [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(view->ref_color.rgb, mv_color_ref, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:78:2: [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(view->select_color.rgb, mv_color_sel, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:79:2: [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(view->default_color.rgb, mv_color_def, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:80:2: [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(view->line_forward_color.rgb, mv_color_lif, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:81:2: [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(view->line_backward_color.rgb, mv_color_lib, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:87:2: [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(view->nav_color.rgb, mv_color_nav, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:88:2: [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(view->tip_color.rgb, mv_color_tip, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:102:2: [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(view->base_color_table[0].rgb, mv_color_A, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:103:2: [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(view->base_color_table[1].rgb, mv_color_C, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:104:2: [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(view->base_color_table[2].rgb, mv_color_G, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:105:2: [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(view->base_color_table[3].rgb, mv_color_T, sizeof(float) * 3); data/maqview-0.2.5/view_goto.c:106:2: [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(view->base_color_table[4].rgb, mv_color_N, sizeof(float) * 3); data/maqview-0.2.5/view_panel.c:11:8: [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 acgt[4] = {'a', 'c', 'g', 't'}; data/maqview-0.2.5/view_panel.c:12:8: [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 ACGT[4] = {'A', 'C', 'G', 'T'}; data/maqview-0.2.5/view_panel.c:75: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 argv[6][80]; data/maqview-0.2.5/view_panel.c:87: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(argv[argc], cmd + off, next_pos - off); data/maqview-0.2.5/view_panel.c:105: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). bindViewPanel(vp, atoi(argv[1]) - 1); data/maqview-0.2.5/view_panel.c:124: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). off = atoi(argv[2]); data/maqview-0.2.5/view_panel.c:128: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). vp->view->step = atoi(argv[2]); data/maqview-0.2.5/view_panel.c:410:4: [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(rgb, view->base_color_table[0].rgb, 3 * sizeof(float)); data/maqview-0.2.5/view_panel.c:414:4: [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(rgb, view->base_color_table[1].rgb, 3 * sizeof(float)); data/maqview-0.2.5/view_panel.c:418:4: [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(rgb, view->base_color_table[2].rgb, 3 * sizeof(float)); data/maqview-0.2.5/view_panel.c:422:4: [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(rgb, view->base_color_table[3].rgb, 3 * sizeof(float)); data/maqview-0.2.5/view_panel.c:425:4: [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(rgb, view->base_color_table[4].rgb, 3 * sizeof(float)); data/maqview-0.2.5/view_panel.c:438: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 str[81]; data/maqview-0.2.5/view_panel.c:476: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 str[81]; data/maqview-0.2.5/view_panel.c:497:4: [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(str, "%ld[%c]", i + refs->show_start + 1, ch); data/maqview-0.2.5/view_panel.c:517: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 str[81]; data/maqview-0.2.5/view_panel.c:538:4: [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(str, "%ld[%c]", i + refs->show_start + 1, ch); data/maqview-0.2.5/view_panel.c:870: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 str[120]; data/maqview-0.2.5/view_panel.c:1115:4: [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(vp->err_string, "Drag navigation to move left/right"); data/maqview-0.2.5/view_panel.c:1150:4: [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(vp->err_string, "enter '?' to get help"); data/maqview-0.2.5/view_panel.c:1169: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(vp->err_string, "enter '?' to get help"); data/maqview-0.2.5/view_panel.c:1336:4: [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(vp->err_string, "goto: %ld", vp->view_number); data/maqview-0.2.5/view_panel.c:1385:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(vp->err_string, "hide mapping qualities"); data/maqview-0.2.5/view_panel.c:1389:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(vp->err_string, "show mapping qualities"); data/maqview-0.2.5/view_panel.c:1398:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(vp->err_string, "visualize paired-end mapping qualities"); data/maqview-0.2.5/view_panel.c:1402:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(vp->err_string, "visualize single-end mapping qualities"); data/maqview-0.2.5/view_panel.c:1414:4: [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(vp->err_string, "try open new view, please input filename"); data/maqview-0.2.5/view_panel.c:1423:4: [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(vp->err_string, "input command"); data/maqview-0.2.5/view_panel.c:1437:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(vp->err_string, "Cannot zoom in in character mode"); data/maqview-0.2.5/view_panel.c:1461:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(vp->err_string, "Cannot zoom out in character mode"); data/maqview-0.2.5/view_panel.c:1497:4: [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(vp->err_string, "Refresh"); data/maqview-0.2.5/view_panel.c:1534:4: [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(vp->err_string, "move view offset to %d line", vp->view->layer_offset); data/maqview-0.2.5/view_panel.c:1540:4: [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(vp->err_string, "move view offset to %d line", vp->view->layer_offset); data/maqview-0.2.5/view_panel.c:1562:4: [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(vp->err_string, "goto begin"); data/maqview-0.2.5/view_panel.c:1568:4: [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(vp->err_string, "goto end"); data/maqview-0.2.5/view_panel.c:1588:6: [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(vp->err_string, "No more read available"); data/maqview-0.2.5/view_panel.c:1610:6: [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(vp->err_string, "No more read available"); data/maqview-0.2.5/view_panel.c:1646:4: [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(vp->err_string, "unknown key binding: %d[%c]", key, key); data/maqview-0.2.5/zrio.c:19:8: [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). fid = open(filename, O_RDONLY); data/maqview-0.2.5/zrio.c:50:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(accname, ".zr"); data/maqview-0.2.5/zrio.c:52:17: [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). zr->acc_file = fopen(accname, "r"); data/maqview-0.2.5/zrio.c:110:11: [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 input[CHUNK]; data/maqview-0.2.5/zrio.c:307:2: [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, here->window + WINSIZE - l, l); data/maqview-0.2.5/zrio.c:425: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(next->window, window + WINSIZE - left, left); data/maqview-0.2.5/zrio.c:427: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(next->window + left, window, WINSIZE - left); data/maqview-0.2.5/zrio.c:463:11: [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 input[CHUNK]; data/maqview-0.2.5/zrio.c:464:11: [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 discard[WINSIZE]; data/maqview-0.2.5/zrio.c:566: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). if((fid = open(filename, O_RDONLY)) == -1) return 0; data/maqview-0.2.5/zrio.c:574:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(accname, ".zr"); data/maqview-0.2.5/zrio.c:575:9: [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 = fopen(accname, "w"); data/maqview-0.2.5/zrio.h:31:11: [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 window[WINSIZE]; data/maqview-0.2.5/zrio_main.c:19: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 buffer[WINSIZE + 1]; data/maqview-0.2.5/zrio_main.c:24:12: [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). level = atoi(argv[3]); data/maqview-0.2.5/zrio_main.c:39:12: [2] (integer) atol: 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). offset = atol(argv[3]); data/maqview-0.2.5/zrio_main.c:43:13: [2] (integer) atol: 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). offlen = atol(argv[4]); data/maqview-0.2.5/zutil.c:14: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. const char * const z_errmsg[10] = { data/maqview-0.2.5/zutil.h:53: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. extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ data/maqview-0.2.5/zutil.h:111:6: [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). fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") data/maqview-0.2.5/zutil.h:173:30: [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). # define F_OPEN(name, mode) fopen((name), (mode)) data/maqview-0.2.5/zutil.h:230: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. # define zmemcpy memcpy data/maqview-0.2.5/MainFrame.c:212:7: [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 = strlen(argv[optind+1]); data/maqview-0.2.5/caches.h:15:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). maqmap1_t read; data/maqview-0.2.5/cns_cache.c:143:29: [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). index_name = (char*)malloc(strlen(filename) + 9); data/maqview-0.2.5/cns_cache.c:188:29: [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). index_name = (char*)malloc(strlen(filename) + 9); data/maqview-0.2.5/cns_cache.c:398:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read_pos(cache->reads[cache->offset + i].read.pos); data/maqview-0.2.5/cns_cache.c:399:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(l=0;l<cache->reads[cache->offset + i].read.size;l++){ data/maqview-0.2.5/cns_cache.c:401:75: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). guess_seqs[(r + l - cns->start) * 4 + (cache->reads[cache->offset + i].read.seq[l]>>6&3)] ++; data/maqview-0.2.5/gl_gui.c:105: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). drawString((list->cell_width - strlen(list->options[i + list->disp_offset]) * 8) / 2, data/maqview-0.2.5/gl_gui.c:183: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). str = (char*)malloc(sizeof(char) * (strlen(option) + 1)); data/maqview-0.2.5/gzio.c:127:28: [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). s->path = (char*)ALLOC(strlen(path)+1); data/maqview-0.2.5/gzio.c:625: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/maqview-0.2.5/gzio.c:662: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/maqview-0.2.5/gzio.c:697:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return gzwrite(file, (char*)s, (unsigned)strlen(s)); data/maqview-0.2.5/gzio.c:1006:27: [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). s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); data/maqview-0.2.5/gzio.c:1006:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); data/maqview-0.2.5/maqmap_index.c:164:29: [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). index_name = (char*)malloc(strlen(filename) + 4); data/maqview-0.2.5/maqmap_index.c:187:29: [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). index_name = (char*)malloc(strlen(filename) + 4); data/maqview-0.2.5/maqmap_index.c:195:30: [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). head_size += sizeof(int) + strlen(mm->ref_name[i]) + 1; data/maqview-0.2.5/maqmap_index.c:238: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). len = strlen(mm->ref_name[i]) + 1; data/maqview-0.2.5/maqmap_index.c:278:29: [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). index_name = (char*)malloc(strlen(filename) + 4); data/maqview-0.2.5/maqmap_index.c:419:6: [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 = strlen(string); data/maqview-0.2.5/maqmap_index.c:436:6: [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 = strlen(string); data/maqview-0.2.5/maqmap_index_main.c:40:6: [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). l = strlen(str); data/maqview-0.2.5/read_cache.c:32:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define let2read(let, reads) memcpy(&((reads)->read), let, sizeof(maplet)); (reads)->flag = 0; (reads)->y = 0 data/maqview-0.2.5/read_cache.c:82:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cache->start = read_pos(cache->reads[cache->offset].read.pos); data/maqview-0.2.5/read_cache.c:84:69: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cache->end = read_pos(cache->reads[cache->offset+cache->size-1].read.pos); data/maqview-0.2.5/read_cache.c:130:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cache->start = read_pos(cache->reads[cache->offset].read.pos); data/maqview-0.2.5/read_cache.c:162:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(cache->reads[cache->offset + i].read.pos) < t - MAX_READ_SIZE) break; data/maqview-0.2.5/read_cache.c:169:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cache->start = read_pos(cache->reads[0].read.pos); data/maqview-0.2.5/read_cache.c:189:66: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cache->end = read_pos(cache->reads[cache->offset+cache->size-1].read.pos); data/maqview-0.2.5/socket_view.c:15:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). num = read(fds, buffer + count, size - count); data/maqview-0.2.5/socket_view.c:40:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(src->cache->index->mm->ref_name[i]); data/maqview-0.2.5/socket_view.c:97:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(i<refs->cache->size-1 && read_pos(refs->cache->reads[i].read.pos) < start){ i++; } data/maqview-0.2.5/socket_view.c:99:66: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(i<refs->cache->size-2 && read_pos(refs->cache->reads[i+1].read.pos) <= end) i++; data/maqview-0.2.5/socket_view.c:103:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pos = read_pos(refs->cache->reads[s].read.pos); data/maqview-0.2.5/socket_view.c:105:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pos = read_pos(refs->cache->reads[e].read.pos); data/maqview-0.2.5/socket_view.c:201:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch(read(sock, &op, 1)){ data/maqview-0.2.5/socket_view.c:499:88: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). print_map(client->info->ref_names[client->info->ref_id], &(client->info->reads[i].read)); data/maqview-0.2.5/view_goto.c:43: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). view->map_file = (char*)malloc(strlen(map_file) + 1); data/maqview-0.2.5/view_goto.c:117: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). cns_name = cns_file? (char*)cns_file : (char*)calloc(strlen(map_file)+6, 1); data/maqview-0.2.5/view_goto.c:130: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). view->cns_file = (char*)malloc(strlen(cns_name) + 1); data/maqview-0.2.5/view_goto.c:217:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_goto.c:226:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) >= layers[j]){ data/maqview-0.2.5/view_goto.c:228:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). layers[j] = read_pos(read->read.pos) + read->read.size + 1; data/maqview-0.2.5/view_goto.c:228:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). layers[j] = read_pos(read->read.pos) + read->read.size + 1; data/maqview-0.2.5/view_goto.c:334:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_goto.c:339:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf("%s\t%d\n", read->read.name, read_pos(read->read.pos) + 1); data/maqview-0.2.5/view_goto.c:339:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). printf("%s\t%d\n", read->read.name, read_pos(read->read.pos) + 1); data/maqview-0.2.5/view_panel.c:79:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd_len = strlen(cmd); data/maqview-0.2.5/view_panel.c:137:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_panel.c:184:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size < last_x + off_y) continue; data/maqview-0.2.5/view_panel.c:184:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size < last_x + off_y) continue; data/maqview-0.2.5/view_panel.c:185:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size > last_x + off_y) break; data/maqview-0.2.5/view_panel.c:185:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size > last_x + off_y) break; data/maqview-0.2.5/view_panel.c:186:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist + off_y == 0){ data/maqview-0.2.5/view_panel.c:366: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). size = strlen(str); data/maqview-0.2.5/view_panel.c:623:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void drawRead_ch(ViewPanel *vp, Read *read, float x, float y){ data/maqview-0.2.5/view_panel.c:633:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0;i<read->read.size;i++){ data/maqview-0.2.5/view_panel.c:637:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_strand(read->read.pos)) data/maqview-0.2.5/view_panel.c:638:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). drawRect(x + (read->read.size - i)* view->font_width, y, data/maqview-0.2.5/view_panel.c:639:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x + (read->read.size - i - 1) * view->font_width, y + view->font_height, -2); data/maqview-0.2.5/view_panel.c:646:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0;i<read->read.size;i++){ data/maqview-0.2.5/view_panel.c:647:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). q = read->read.seq[i] & 0x3f; data/maqview-0.2.5/view_panel.c:648:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read->read.seq[i] == 0) ch = 'n'; data/maqview-0.2.5/view_panel.c:649:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else if (q < 27) ch = acgt[read->read.seq[i]>>6&3]; data/maqview-0.2.5/view_panel.c:650:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else ch = ACGT[read->read.seq[i]>>6&3]; data/maqview-0.2.5/view_panel.c:654:83: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ref = cns_get_ref(view->refs.cns->seqs[view->refs.cns->offset + read_pos(read->read.pos) + i - view->refs.cns->start]); data/maqview-0.2.5/view_panel.c:656:83: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ref = cns_get_cns(view->refs.cns->seqs[view->refs.cns->offset + read_pos(read->read.pos) + i - view->refs.cns->start]); data/maqview-0.2.5/view_panel.c:668:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void drawRead_sq(ViewPanel *vp, Read *read, float x, float y){ data/maqview-0.2.5/view_panel.c:674:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). map_qual = (vp->global_flag & GF_IS_SINGLEQ)? read->read.seq[MAX_READLEN-1] : read->read.map_qual; data/maqview-0.2.5/view_panel.c:674:86: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). map_qual = (vp->global_flag & GF_IS_SINGLEQ)? read->read.seq[MAX_READLEN-1] : read->read.map_qual; data/maqview-0.2.5/view_panel.c:679:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0;i<read->read.size;i++){ data/maqview-0.2.5/view_panel.c:684:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_strand(read->read.pos)) data/maqview-0.2.5/view_panel.c:685:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). drawRect(x + (read->read.size - i)* view->base_width * view->scale_x, y, data/maqview-0.2.5/view_panel.c:686:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x + (read->read.size - i - 1) * view->base_width * view->scale_x , y + view->base_height * view->scale_y, -2); data/maqview-0.2.5/view_panel.c:694:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0;i<read->read.size;i++){ data/maqview-0.2.5/view_panel.c:695:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). q = read->read.seq[i] & 0x3f; data/maqview-0.2.5/view_panel.c:696:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read->read.seq[i] == 0) ch = 'n'; data/maqview-0.2.5/view_panel.c:697:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else if (q < 27) ch = acgt[read->read.seq[i]>>6&3]; data/maqview-0.2.5/view_panel.c:698:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else ch = ACGT[read->read.seq[i]>>6&3]; data/maqview-0.2.5/view_panel.c:714:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void drawRead_li(ViewPanel *vp, Read *read, float x, float y){ data/maqview-0.2.5/view_panel.c:721:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_strand(read->read.pos)) data/maqview-0.2.5/view_panel.c:727:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x + read->read.size * view->line_width * view->scale_x, y + view->line_height * view->scale_y * 2 / 3, 0); data/maqview-0.2.5/view_panel.c:728:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist > 0){ data/maqview-0.2.5/view_panel.c:730:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). glVertex3f(x + (read->read.size - 1) * view->line_width * view->scale_x, y + view->line_height * view->scale_y, 0); data/maqview-0.2.5/view_panel.c:731:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). glVertex3f(x + (read->read.size - 1) * view->line_width * view->scale_x, y, 0); data/maqview-0.2.5/view_panel.c:732:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). glVertex3f(x + (read->read.size) * view->line_width * view->scale_x, y + view->line_height * view->scale_y / 3, 0); data/maqview-0.2.5/view_panel.c:733:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). glVertex3f(x + (read->read.size) * view->line_width * view->scale_x, y + view->line_height * view->scale_y * 2 / 3, 0); data/maqview-0.2.5/view_panel.c:735:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } else if(read->read.dist < 0){ data/maqview-0.2.5/view_panel.c:745:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void drawRead(ViewPanel *vp, Read *read, float x, float y){ data/maqview-0.2.5/view_panel.c:748:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return drawRead_ch(vp, read, x, y); data/maqview-0.2.5/view_panel.c:750:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return drawRead_sq(vp, read, x, y); data/maqview-0.2.5/view_panel.c:752:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return drawRead_li(vp, read, x, y); data/maqview-0.2.5/view_panel.c:756:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int selectRead_ch(ViewPanel *vp, Read *read, float x, float y, int id){ data/maqview-0.2.5/view_panel.c:758:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0;i<read->read.size;i++){ data/maqview-0.2.5/view_panel.c:765:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int selectRead_sq(ViewPanel *vp, Read *read, float x, float y, int id){ data/maqview-0.2.5/view_panel.c:767:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0;i<read->read.size;i++){ data/maqview-0.2.5/view_panel.c:775:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int selectRead_li(ViewPanel *vp, Read *read, float x, float y, int id){ data/maqview-0.2.5/view_panel.c:778:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x + (read->read.size) * vp->view->line_width * vp->view->scale_x, y + vp->view->line_height * vp->view->scale_y); data/maqview-0.2.5/view_panel.c:782:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int selectRead(ViewPanel *vp, Read *read, float x, float y, int id){ data/maqview-0.2.5/view_panel.c:785:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return selectRead_ch(vp, read, x, y, id); data/maqview-0.2.5/view_panel.c:787:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return selectRead_sq(vp, read, x, y, id); data/maqview-0.2.5/view_panel.c:789:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return selectRead_li(vp, read, x, y, id); data/maqview-0.2.5/view_panel.c:802:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_panel.c:846:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) > refs->show_start + ch_width) break; data/maqview-0.2.5/view_panel.c:849:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x = (read_pos(read->read.pos) - refs->show_start) * font_width; data/maqview-0.2.5/view_panel.c:851:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size < refs->show_start) continue; data/maqview-0.2.5/view_panel.c:851:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size < refs->show_start) continue; data/maqview-0.2.5/view_panel.c:852:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). drawRead(vp, read, x, y); data/maqview-0.2.5/view_panel.c:910:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_panel.c:974:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) > refs->show_start + ch_width) break; data/maqview-0.2.5/view_panel.c:977:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x = (read_pos(read->read.pos) - refs->show_start) * font_width; data/maqview-0.2.5/view_panel.c:979:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size < refs->show_start) continue; data/maqview-0.2.5/view_panel.c:979:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(read->read.pos) + read->read.size < refs->show_start) continue; data/maqview-0.2.5/view_panel.c:980:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(x + read->read.size * font_width < rect[0] || x > rect[2]) continue; data/maqview-0.2.5/view_panel.c:982:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = selectRead(vp, read, x, y, id); data/maqview-0.2.5/view_panel.c:989:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). obj->ptr = read; data/maqview-0.2.5/view_panel.c:1057:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_panel.c:1075:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). print_map(vp->view->refs.cache->index->mm, &(read->read)); data/maqview-0.2.5/view_panel.c:1078:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist) notifyView(vp->view, VIEW_EVENT_SELECT_READ, read->read.dist>0? read_pos(read->read.pos):read_pos(read->read.pos)+read->read.size, read->read.dist); data/maqview-0.2.5/view_panel.c:1078:75: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist) notifyView(vp->view, VIEW_EVENT_SELECT_READ, read->read.dist>0? read_pos(read->read.pos):read_pos(read->read.pos)+read->read.size, read->read.dist); data/maqview-0.2.5/view_panel.c:1078:103: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist) notifyView(vp->view, VIEW_EVENT_SELECT_READ, read->read.dist>0? read_pos(read->read.pos):read_pos(read->read.pos)+read->read.size, read->read.dist); data/maqview-0.2.5/view_panel.c:1078:128: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist) notifyView(vp->view, VIEW_EVENT_SELECT_READ, read->read.dist>0? read_pos(read->read.pos):read_pos(read->read.pos)+read->read.size, read->read.dist); data/maqview-0.2.5/view_panel.c:1078:144: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist) notifyView(vp->view, VIEW_EVENT_SELECT_READ, read->read.dist>0? read_pos(read->read.pos):read_pos(read->read.pos)+read->read.size, read->read.dist); data/maqview-0.2.5/view_panel.c:1078:161: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read->read.dist) notifyView(vp->view, VIEW_EVENT_SELECT_READ, read->read.dist>0? read_pos(read->read.pos):read_pos(read->read.pos)+read->read.size, read->read.dist); data/maqview-0.2.5/view_panel.c:1085:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_panel.c:1108:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Read *read; data/maqview-0.2.5/view_panel.c:1125:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). q = read->read.seq[id] & 0x3f; data/maqview-0.2.5/view_panel.c:1129:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read->read.seq[id] == 0) ch = 'n'; data/maqview-0.2.5/view_panel.c:1130:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else if (q < 27) ch = acgt[read->read.seq[id]>>6&3]; data/maqview-0.2.5/view_panel.c:1131:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else ch = ACGT[read->read.seq[id]>>6&3]; data/maqview-0.2.5/view_panel.c:1132:74: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sprintf(vp->err_string, "Read: %ld|%c|%s[%d]|%c %d", read_pos(read->read.pos) + 1, data/maqview-0.2.5/view_panel.c:1133:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_strand(read->read.pos)? '-':'+', read->read.name, id + 1, ch, q); data/maqview-0.2.5/view_panel.c:1133:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_strand(read->read.pos)? '-':'+', read->read.name, id + 1, ch, q); data/maqview-0.2.5/view_panel.c:1136:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sprintf(vp->err_string, "Read: %ld|%c|%s", read_pos(read->read.pos) + 1, data/maqview-0.2.5/view_panel.c:1137:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_strand(read->read.pos)? '-':'+', read->read.name); data/maqview-0.2.5/view_panel.c:1137:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_strand(read->read.pos)? '-':'+', read->read.name); data/maqview-0.2.5/view_panel.c:1576:80: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(vp->view->refs.cache->reads[vp->view->refs.cache->offset + i].read.pos) > t){ data/maqview-0.2.5/view_panel.c:1578:79: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_pos(vp->view->refs.cache->reads[vp->view->refs.cache->offset + i].read.pos)); data/maqview-0.2.5/view_panel.c:1599:80: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read_pos(vp->view->refs.cache->reads[vp->view->refs.cache->offset + i].read.pos) < t){ data/maqview-0.2.5/view_panel.c:1601:79: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_pos(vp->view->refs.cache->reads[vp->view->refs.cache->offset + i].read.pos)); data/maqview-0.2.5/zrio.c:48:26: [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). accname = (char*)malloc(strlen(filename) + 4); data/maqview-0.2.5/zrio.c:67:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). zr->stream->avail_in = read(zr->fid, zr->inbuf, WINSIZE); data/maqview-0.2.5/zrio.c:144:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(zr->fid, &ret, 1) == 0){ data/maqview-0.2.5/zrio.c:173:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strm->avail_in = read(zr->fid, zr->inbuf, WINSIZE); data/maqview-0.2.5/zrio.c:488:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). strm.avail_in = read(in, input, CHUNK); data/maqview-0.2.5/zrio.c:572:26: [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). accname = (char*)malloc(strlen(filename) + 4); ANALYSIS SUMMARY: Hits = 342 Lines analyzed = 18265 in approximately 0.60 seconds (30291 lines/second) Physical Source Lines of Code (SLOC) = 13447 Hits@level = [0] 140 [1] 147 [2] 141 [3] 3 [4] 51 [5] 0 Hits@level+ = [0+] 482 [1+] 342 [2+] 195 [3+] 54 [4+] 51 [5+] 0 Hits/KSLOC@level+ = [0+] 35.8444 [1+] 25.4332 [2+] 14.5014 [3+] 4.01577 [4+] 3.79267 [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.