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/rasqal-0.9.33/getopt/rasqal_getopt.h
Examining data/rasqal-0.9.33/getopt/getopt.c
Examining data/rasqal-0.9.33/tests/engine/rasqal_order_test.c
Examining data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c
Examining data/rasqal-0.9.33/tests/engine/rasqal_construct_test.c
Examining data/rasqal-0.9.33/tests/engine/rasqal_triples_test.c
Examining data/rasqal-0.9.33/tests/engine/rasqal_graph_test.c
Examining data/rasqal-0.9.33/tests/algebra/convert_graph_pattern.c
Examining data/rasqal-0.9.33/libsv/sv.c
Examining data/rasqal-0.9.33/libsv/svtest.c
Examining data/rasqal-0.9.33/libsv/sv.h
Examining data/rasqal-0.9.33/libsv/example.c
Examining data/rasqal-0.9.33/libsv/sv2c.c
Examining data/rasqal-0.9.33/src/rasqal_dataset.c
Examining data/rasqal-0.9.33/src/rasqal_projection.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_empty.c
Examining data/rasqal-0.9.33/src/rasqal_format_table.c
Examining data/rasqal-0.9.33/src/rasqal_expr_datetimes.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_triples.c
Examining data/rasqal-0.9.33/src/rasqal_general.c
Examining data/rasqal-0.9.33/src/rasqal_sort.c
Examining data/rasqal-0.9.33/src/rasqal_expr_strings.c
Examining data/rasqal-0.9.33/src/rasqal_row.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_join.c
Examining data/rasqal-0.9.33/src/rasqal_results_compare.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_sort.c
Examining data/rasqal-0.9.33/src/rasqal_map.c
Examining data/rasqal-0.9.33/src/rasqal_raptor.c
Examining data/rasqal-0.9.33/src/rasqal_expr_evaluate.c
Examining data/rasqal-0.9.33/src/rasqal_format_json.c
Examining data/rasqal-0.9.33/src/rasqal_double.c
Examining data/rasqal-0.9.33/src/rasqal_query_test.c
Examining data/rasqal-0.9.33/src/rasqal_ntriples.c
Examining data/rasqal-0.9.33/src/sparql_lexer.c
Examining data/rasqal-0.9.33/src/rasqal_expr.c
Examining data/rasqal-0.9.33/src/rasqal_query_write.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_groupby.c
Examining data/rasqal-0.9.33/src/rasqal_random.c
Examining data/rasqal-0.9.33/src/rasqal_literal.c
Examining data/rasqal-0.9.33/src/rasqal_solution_modifier.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_filter.c
Examining data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c
Examining data/rasqal-0.9.33/src/gettimeofday.c
Examining data/rasqal-0.9.33/src/rasqal_row_compatible.c
Examining data/rasqal-0.9.33/src/win32_rasqal_config.h
Examining data/rasqal-0.9.33/src/rasqal_algebra.c
Examining data/rasqal-0.9.33/src/rasqal_query_results.c
Examining data/rasqal-0.9.33/src/rasqal_formula.c
Examining data/rasqal-0.9.33/src/rasqal_service.c
Examining data/rasqal-0.9.33/src/sparql_common.h
Examining data/rasqal-0.9.33/src/rasqal_result_formats.c
Examining data/rasqal-0.9.33/src/sv_config.h
Examining data/rasqal-0.9.33/src/rasqal_rowsource_graph.c
Examining data/rasqal-0.9.33/src/rasqal_feature.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_distinct.c
Examining data/rasqal-0.9.33/src/rasqal_engine.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_having.c
Examining data/rasqal-0.9.33/src/ssort.h
Examining data/rasqal-0.9.33/src/rasqal_rowsource_service.c
Examining data/rasqal-0.9.33/src/rasqal_digest.c
Examining data/rasqal-0.9.33/src/sparql_lexer.h
Examining data/rasqal-0.9.33/src/rasqal_datetime.c
Examining data/rasqal-0.9.33/src/mtwist_config.h
Examining data/rasqal-0.9.33/src/rasqal_graph_pattern.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_assignment.c
Examining data/rasqal-0.9.33/src/rasqal_format_rdf.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_aggregation.c
Examining data/rasqal-0.9.33/src/rasqal_engine_sort.c
Examining data/rasqal-0.9.33/src/sparql_parser.c
Examining data/rasqal-0.9.33/src/rasqal_query.c
Examining data/rasqal-0.9.33/src/rasqal_update.c
Examining data/rasqal-0.9.33/src/rasqal_digest_md5.c
Examining data/rasqal-0.9.33/src/rasqal_format_html.c
Examining data/rasqal-0.9.33/src/rasqal_iostream.c
Examining data/rasqal-0.9.33/src/strcasecmp.c
Examining data/rasqal-0.9.33/src/rasqal_query_transform.c
Examining data/rasqal-0.9.33/src/rasqal_bindings.c
Examining data/rasqal-0.9.33/src/rasqal_internal.h
Examining data/rasqal-0.9.33/src/rasqal_rowsource_union.c
Examining data/rasqal-0.9.33/src/rasqal_expr_numerics.c
Examining data/rasqal-0.9.33/src/rasqal_digest_sha1.c
Examining data/rasqal-0.9.33/src/rasqal_prefix.c
Examining data/rasqal-0.9.33/src/rasqal_data_graph.c
Examining data/rasqal-0.9.33/src/rasqal_format_sv.c
Examining data/rasqal-0.9.33/src/rasqal_triples_source.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_bindings.c
Examining data/rasqal-0.9.33/src/timegm.c
Examining data/rasqal-0.9.33/src/rasqal_format_sparql_xml.c
Examining data/rasqal-0.9.33/src/rasqal_variable.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_slice.c
Examining data/rasqal-0.9.33/src/rasqal_decimal.c
Examining data/rasqal-0.9.33/src/rasqal_rowsource_project.c
Examining data/rasqal-0.9.33/src/rasqal_engine_algebra.c
Examining data/rasqal-0.9.33/src/rasqal_triple.c
Examining data/rasqal-0.9.33/src/snprintf.c
Examining data/rasqal-0.9.33/src/sparql_parser.h
Examining data/rasqal-0.9.33/src/rasqal_rowsource_rowsequence.c
Examining data/rasqal-0.9.33/src/rasqal_regex.c
Examining data/rasqal-0.9.33/utils/to-ntriples.c
Examining data/rasqal-0.9.33/utils/manifest.h
Examining data/rasqal-0.9.33/utils/testrunner.c
Examining data/rasqal-0.9.33/utils/srxwrite.c
Examining data/rasqal-0.9.33/utils/check_query.c
Examining data/rasqal-0.9.33/utils/srxread.c
Examining data/rasqal-0.9.33/utils/rasqalcmdline.h
Examining data/rasqal-0.9.33/utils/manifest.c
Examining data/rasqal-0.9.33/utils/results.c
Examining data/rasqal-0.9.33/utils/roqet.c
Examining data/rasqal-0.9.33/utils/read_files.c
Examining data/rasqal-0.9.33/libmtwist/mtwist.h
Examining data/rasqal-0.9.33/libmtwist/test.c
Examining data/rasqal-0.9.33/libmtwist/mtwist_internal.h
Examining data/rasqal-0.9.33/libmtwist/mt.c
Examining data/rasqal-0.9.33/libmtwist/seed.c

FINAL RESULTS:

data/rasqal-0.9.33/libsv/example.c:134:6:  [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(access(data_file, R_OK)) {
data/rasqal-0.9.33/libsv/sv2c.c:166:6:  [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(access(data_file, R_OK)) {
data/rasqal-0.9.33/src/rasqal_decimal.c:380:26:  [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.
#define DECIMAL_SNPRINTF snprintf
data/rasqal-0.9.33/src/rasqal_decimal.c:392:26:  [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.
#define DECIMAL_SNPRINTF snprintf
data/rasqal-0.9.33/src/rasqal_decimal.c:434:3:  [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(fmt, sizeof(fmt), DECIMAL_FMT, dec->precision_digits);
data/rasqal-0.9.33/src/rasqal_expr.c:2471:82:  [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 assert_match(function, result, string) do { if(strcmp(result, string)) { fprintf(stderr, #function " failed - returned %s, expected %s\n", result, string); exit(1); } } while(0)
data/rasqal-0.9.33/src/rasqal_general.c:609:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, message, arguments);
data/rasqal-0.9.33/src/rasqal_general.c:796:13:  [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(RASQAL_GOOD_CAST(const char*, p), ((ulen == 4) ? "%04lx" : "%08lx"), &unichar);
data/rasqal-0.9.33/src/rasqal_internal.h:93:32:  [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 RASQAL_DEBUG1(msg) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__); } while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:94:38:  [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 RASQAL_DEBUG2(msg, arg1) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1);} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:95:44:  [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 RASQAL_DEBUG3(msg, arg1, arg2) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2);} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:96:50:  [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 RASQAL_DEBUG4(msg, arg1, arg2, arg3) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2, arg3);} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:97:56:  [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 RASQAL_DEBUG5(msg, arg1, arg2, arg3, arg4) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2, arg3, arg4);} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:98:62:  [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 RASQAL_DEBUG6(msg, arg1, arg2, arg3, arg4, arg5) do {fprintf(stderr, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2, arg3, arg4, arg5);} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:189:32:  [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 RASQAL_FATAL1(msg) do {fprintf(stderr, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__); abort();} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:190:36:  [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 RASQAL_FATAL2(msg,arg) do {fprintf(stderr, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__, arg); abort();} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:191:42:  [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 RASQAL_FATAL3(msg,arg1,arg2) do {fprintf(stderr, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__, arg1, arg2); abort();} while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:194:93:  [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 RASQAL_DEPRECATED_MESSAGE(msg) do {static int warning_given=0; if(!warning_given++) fprintf(stderr, "Function %s is deprecated - " msg,  __FUNCTION__); } while(0)
data/rasqal-0.9.33/src/rasqal_internal.h:197:45:  [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 RASQAL_DEPRECATED_MESSAGE(msg) do { fprintf(stderr, "Function %s is deprecated - " msg,  __FUNCTION__); } while(0)
data/rasqal-0.9.33/src/rasqal_ntriples.c:375:15:  [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((const char*)p, ((ulen == 4) ? "%04lx" : "%08lx"), &unichar);
data/rasqal-0.9.33/src/rasqal_query_results.c:1230:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(RASQAL_GOOD_CAST(char*, buffer), "r%dq%s", prefix_id, string);
data/rasqal-0.9.33/src/rasqal_query_test.c:102:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(RASQAL_GOOD_CAST(char*, query_string), query_format, data_string);
data/rasqal-0.9.33/src/rasqal_raptor.c:150:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(RASQAL_GOOD_CAST(char*, buffer), "%s%d", base, counter);
data/rasqal-0.9.33/src/rasqal_rowsource_triples.c:505:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(RASQAL_GOOD_CAST(char*, query_string), query_format, data_string);
data/rasqal-0.9.33/src/sparql_lexer.c:4339:13:  [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(RASQAL_GOOD_CAST(const char*, s), ((ulen == 4) ? "%04lx" : "%08lx"), &unichar);
data/rasqal-0.9.33/src/sparql_lexer.c:5084:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "STRING(\"%s\")", lval->name);
data/rasqal-0.9.33/src/sparql_lexer.c:5091:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "URI_LITERAL(%s)",
data/rasqal-0.9.33/src/sparql_lexer.c:5097:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "QNAME_LITERAL(%s)", lval->name);
data/rasqal-0.9.33/src/sparql_lexer.c:5101:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "URI_LITERAL_BRACE(%s)",
data/rasqal-0.9.33/src/sparql_lexer.c:5107:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "QNAME_LITERAL_BRACE(%s)", lval->name);
data/rasqal-0.9.33/src/sparql_lexer.c:5111:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "IDENTIFIER(%s)", lval->name);
data/rasqal-0.9.33/src/sparql_lexer.c:5115:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "BLANK_LITERAL(%s)", lval->name);
data/rasqal-0.9.33/src/sparql_lexer.c:5121:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->literal->string);
data/rasqal-0.9.33/src/sparql_lexer.c:5125:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer, "LANGTAG(%s)", lval->name);
data/rasqal-0.9.33/src/sparql_parser.c:1808:21:  [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 YYFPRINTF fprintf
data/rasqal-0.9.33/src/win32_rasqal_config.h:48:9:  [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.
#define snprintf _snprintf
data/rasqal-0.9.33/src/win32_rasqal_config.h:48:18:  [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.
#define snprintf _snprintf
data/rasqal-0.9.33/src/win32_rasqal_config.h:49: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.
#define access _access
data/rasqal-0.9.33/tests/engine/rasqal_construct_test.c:116:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf((char*)query_string, query_format, data_dir_string, data_file);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:178:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf((char*)query_string, query_format, data_string, lim, off);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:184:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf((char*)query_string, query_format, data_string);
data/rasqal-0.9.33/tests/engine/rasqal_order_test.c:123:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf((char*)query_string, query_format, data_dir_string, animals,
data/rasqal-0.9.33/utils/read_files.c:242:14:  [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.
  } else if(!access(name, R_OK)) {
data/rasqal-0.9.33/utils/roqet.c:1282: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.
    } else if(!access((const char*)uri_string, R_OK)) {
data/rasqal-0.9.33/utils/testrunner.c:291:7:  [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(!access((const char*)uri_string, R_OK)) {
data/rasqal-0.9.33/utils/to-ntriples.c:124:7:  [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(!access((const char*)uri_string, R_OK)) {
data/rasqal-0.9.33/getopt/getopt.c:68:1:  [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.
getopt (int argc, char * const argv[], const char *optstring)
data/rasqal-0.9.33/getopt/rasqal_getopt.h:13:5:  [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.
int getopt(int argc, char * const argv[], const char *optstring);
data/rasqal-0.9.33/src/rasqal_expr.c:2383:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  if(!eval_context->random) {
data/rasqal-0.9.33/src/rasqal_expr.c:2408:20:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  if(eval_context->random)
data/rasqal-0.9.33/src/rasqal_expr.c:2409:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    rasqal_free_random(eval_context->random);
data/rasqal-0.9.33/src/rasqal_expr.c:2456:43:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  return rasqal_random_seed(eval_context->random, seed);
data/rasqal-0.9.33/src/rasqal_expr_numerics.c:249:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  d = rasqal_random_drand(eval_context->random);
data/rasqal-0.9.33/src/rasqal_expr_numerics.c:378:48:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    *out++ = rasqal_random_irand(eval_context->random);
data/rasqal-0.9.33/src/rasqal_query_test.c:88:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if((data_file = getenv("RDF_DATA_FILE"))) {
data/rasqal-0.9.33/src/rasqal_random.c:164:5:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    setstate(RASQAL_GOOD_CAST(char*, random_object->data));
data/rasqal-0.9.33/src/rasqal_random.c:210:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(seed);
data/rasqal-0.9.33/src/rasqal_random.c:260:15:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  old_state = setstate(random_object->state);
data/rasqal-0.9.33/src/rasqal_random.c:261:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  r = RASQAL_GOOD_CAST(int, random());
data/rasqal-0.9.33/src/rasqal_random.c:262:3:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  setstate(old_state);
data/rasqal-0.9.33/src/rasqal_rowsource_triples.c:483:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if((data_file = getenv("NT_DATA_FILE"))) {
data/rasqal-0.9.33/src/sparql_lexer.c:5203:14:  [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.
  filename = getenv("SPARQL_QUERY_FILE");
data/rasqal-0.9.33/src/sparql_parser.c:10465:14:  [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.
  filename = getenv("SPARQL_QUERY_FILE");
data/rasqal-0.9.33/src/sparql_parser.c:10468: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.
    int c = getopt (argc, argv, GETOPT_STRING);
data/rasqal-0.9.33/src/timegm.c:52:10:  [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.
  zone = getenv("TZ");
data/rasqal-0.9.33/utils/check_query.c:251:9:  [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, GETOPT_STRING, long_options, &option_index);
data/rasqal-0.9.33/utils/check_query.c:253:9:  [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, GETOPT_STRING);
data/rasqal-0.9.33/utils/roqet.c:921:16:  [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.
    char* sr = getenv("RASQAL_DEBUG_STORE_RESULTS");
data/rasqal-0.9.33/utils/roqet.c:934:9:  [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, GETOPT_STRING, long_options, &option_index);
data/rasqal-0.9.33/utils/roqet.c:936:9:  [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, GETOPT_STRING);
data/rasqal-0.9.33/utils/testrunner.c:215:9:  [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, GETOPT_STRING, long_options, &option_index);
data/rasqal-0.9.33/utils/testrunner.c:217:9:  [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, GETOPT_STRING);
data/rasqal-0.9.33/libsv/example.c:65: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(c->line, line, length + 1);
data/rasqal-0.9.33/libsv/example.c:141: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).
  fh = fopen(data_file, "r");
data/rasqal-0.9.33/libsv/example.c: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 buffer[1024];
data/rasqal-0.9.33/libsv/sv.c:291:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nbuffer, t->buffer, t->len);
data/rasqal-0.9.33/libsv/sv.c:564:7:  [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(s, t->fields[i], t->fields_widths[i]+1);
data/rasqal-0.9.33/libsv/sv.c:631: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(t->buffer + t->len, buffer, len);
data/rasqal-0.9.33/libsv/sv2c.c:68: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(c->line, line, length + 1);
data/rasqal-0.9.33/libsv/sv2c.c:173: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).
  fh = fopen(data_file, "r");
data/rasqal-0.9.33/libsv/sv2c.c:207: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[1024];
data/rasqal-0.9.33/libsv/svtest.c:137: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(c->line, line, length + 1);
data/rasqal-0.9.33/libsv/svtest.c:299: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).
    test_index = atoi(argv[1]);
data/rasqal-0.9.33/src/rasqal_algebra.c:829: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.
static const char spaces[SPACES_LENGTH+1] = "                                                                                ";
data/rasqal-0.9.33/src/rasqal_algebra.c:1700: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(node, anode, sizeof(rasqal_algebra_node));
data/rasqal-0.9.33/src/rasqal_algebra.c:1710: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(node, anode, sizeof(rasqal_algebra_node));
data/rasqal-0.9.33/src/rasqal_algebra.c:1822: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 var_name[20];
data/rasqal-0.9.33/src/rasqal_algebra.c:1837: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(var_name, "$$agg$$%d", ae->counter++);
data/rasqal-0.9.33/src/rasqal_data_graph.c:78:7:  [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(dg->format_type, format_type, len + 1);
data/rasqal-0.9.33/src/rasqal_data_graph.c:87:7:  [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(dg->format_name, format_name, len + 1);
data/rasqal-0.9.33/src/rasqal_datetime.c:209: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 b[B_SIZE];
data/rasqal-0.9.33/src/rasqal_datetime.c:242: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(b, q, l);
data/rasqal-0.9.33/src/rasqal_datetime.c:821: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 timezone_string[TIMEZONE_BUFFER_LEN + 1];
data/rasqal-0.9.33/src/rasqal_datetime.c:887: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(p, timezone_string, RASQAL_GOOD_CAST(size_t, tz_string_len));
data/rasqal-0.9.33/src/rasqal_datetime.c:1093: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 str[10];
data/rasqal-0.9.33/src/rasqal_datetime.c:1095: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(str, "%d.%06d", dt->second, dt->microseconds);
data/rasqal-0.9.33/src/rasqal_datetime.c:1130: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 timezone_string[TIMEZONE_BUFFER_LEN + 1];
data/rasqal-0.9.33/src/rasqal_datetime.c:1190: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(p, timezone_string, RASQAL_GOOD_CAST(size_t, tz_string_len));
data/rasqal-0.9.33/src/rasqal_datetime.c:1496:10:  [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.
    p += sprintf(p, "%dH", hours);
data/rasqal-0.9.33/src/rasqal_datetime.c:1510:10:  [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.
    p += sprintf(p, "%dM", minutes);
data/rasqal-0.9.33/src/rasqal_decimal.c:239: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(dec->string, string, len + 1);
data/rasqal-0.9.33/src/rasqal_decimal.c:415: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 fmt[18];
data/rasqal-0.9.33/src/rasqal_digest.c:181: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(output, gcry_md_read(hash, algo), output_len);
data/rasqal-0.9.33/src/rasqal_digest_md5.c:69: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 c[128];
data/rasqal-0.9.33/src/rasqal_digest_md5.c:74: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 c[64];
data/rasqal-0.9.33/src/rasqal_digest_md5.c:77: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.
  unsigned char digest[MD5_DIGEST_LEN];
data/rasqal-0.9.33/src/rasqal_digest_md5.c:155:7:  [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(p, buf, len);
data/rasqal-0.9.33/src/rasqal_digest_md5.c:158: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(p, buf, t);
data/rasqal-0.9.33/src/rasqal_digest_md5.c:168: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->in.c, buf, 64);
data/rasqal-0.9.33/src/rasqal_digest_md5.c:177: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(ctx->in.c, buf, len);
data/rasqal-0.9.33/src/rasqal_digest_md5.c:223: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(ctx->digest, ctx->buf.c, MD5_DIGEST_LEN);
data/rasqal-0.9.33/src/rasqal_digest_md5.c:342: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((void*)output, ctx.digest, MD5_DIGEST_LEN);
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:113: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.
  unsigned char buffer[64];
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:114: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.
  unsigned char digest[SHA1_DIGEST_LENGTH];
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:118:56:  [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 void SHA1Transform(u32 state[5], const unsigned char buffer[64]);
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:149:44:  [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.
SHA1Transform(u32 state[5], const unsigned char buffer[64])
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:153: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 c[64];
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:158:19:  [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 unsigned char workspace[64];
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:160: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(block, buffer, 64);
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:234: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(&context->buffer[j], data, (i = 64-j));
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:243: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(&context->buffer[j], &data[i], len - i);
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:253: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.
  unsigned char finalcount[8];
data/rasqal-0.9.33/src/rasqal_digest_sha1.c:295: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((void*)output, ctx.digest, SHA1_DIGEST_LENGTH);
data/rasqal-0.9.33/src/rasqal_engine.c:43: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.
static const char rasqal_engine_parts_string[16][5] = {
data/rasqal-0.9.33/src/rasqal_expr.c:2326: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(*e_out, e_in, sizeof(**e_out));
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:181: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(new_s, s, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:256: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(new_s, s, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:261: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(new_lang, lang, lang_len + 1);
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:622: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(RASQAL_GOOD_CAST(char*, new_s), RASQAL_GOOD_CAST(const char*, s), len + 1);
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:687: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(RASQAL_GOOD_CAST(char*, new_s), l1->language, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:867: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(RASQAL_GOOD_CAST(char*, new_s), s, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_numerics.c:354: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.
  unsigned char b[16];
data/rasqal-0.9.33/src/rasqal_expr_numerics.c:442: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(p, RASQAL_UUID_URI_PREFIX, RASQAL_UUID_URI_PREFIX_LEN);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:168: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(new_lang, l1->language, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:263: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(new_lang, l1->language, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:624:11:  [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(lang_tag, arg_literal->language, lang_len + 1);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:945:7:  [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(new_lang, l1->language, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:960: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(result, haystack, result_len);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:1064:7:  [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(new_lang, l1->language, len + 1);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:1079: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(result, ptr, result_len);
data/rasqal-0.9.33/src/rasqal_format_rdf.c:110: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.
  unsigned char buffer[FILE_READ_BUF_SIZE]; /* iostream read buffer */
data/rasqal-0.9.33/src/rasqal_format_sparql_xml.c:497: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.
  unsigned char buffer[FILE_READ_BUF_SIZE]; /* iostream read buffer */
data/rasqal-0.9.33/src/rasqal_format_sparql_xml.c:753:11:  [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(lvalue, value, value_len + 1);
data/rasqal-0.9.33/src/rasqal_format_sparql_xml.c:759:11:  [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(language_str, con->language, language_len + 1);
data/rasqal-0.9.33/src/rasqal_format_sparql_xml.c:775: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(lvalue, value, value_len + 1);
data/rasqal-0.9.33/src/rasqal_format_sv.c:324: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 buffer[FILE_READ_BUF_SIZE]; /* iostream read buffer */
data/rasqal-0.9.33/src/rasqal_format_sv.c:419: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(lvalue, field, field_len + 1);
data/rasqal-0.9.33/src/rasqal_format_table.c:188: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(p, VSEP, VSEP_LEN);
data/rasqal-0.9.33/src/rasqal_format_table.c:192:7:  [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(p, VSEP, VSEP_LEN);
data/rasqal-0.9.33/src/rasqal_general.c:758:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dest, p, unichar_len);
data/rasqal-0.9.33/src/rasqal_general.c:921: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(prefix_copy, prefix, length + 1);
data/rasqal-0.9.33/src/rasqal_general.c:997: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(buffer, world->default_generate_bnodeid_handler_prefix,
data/rasqal-0.9.33/src/rasqal_general.c:999: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(RASQAL_GOOD_CAST(char*, buffer) + world->default_generate_bnodeid_handler_prefix_length,
data/rasqal-0.9.33/src/rasqal_general.c:1002: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(RASQAL_GOOD_CAST(char*, buffer), "bnodeid%d", id);
data/rasqal-0.9.33/src/rasqal_graph_pattern.c:478: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.
static const char spaces[SPACES_LENGTH + 1] = "                                                                                ";
data/rasqal-0.9.33/src/rasqal_internal.h:1895: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 state[RASQAL_RANDOM_STATE_SIZE];
data/rasqal-0.9.33/src/rasqal_iostream.c:95: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(ptr, RASQAL_GOOD_CAST(char*, con->string) + con->offset, blen);
data/rasqal-0.9.33/src/rasqal_literal.c:481: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 buffer[30];
data/rasqal-0.9.33/src/rasqal_literal.c:498:7:  [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(buffer, "%g", d);
data/rasqal-0.9.33/src/rasqal_literal.c:624: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((void*)l->string, string, l->string_len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:2075: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(new_s, s, len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:2151: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(new_s, s, len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:2161: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(new_s, s, len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:3106: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((void*)new_l->string, l->string, l->string_len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:3399: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(new_string, string, len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:4797: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(val, str, str_len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:4872: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(new_str, term->value.literal.string, len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:4880:7:  [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(language, term->value.literal.language, len + 1);
data/rasqal-0.9.33/src/rasqal_literal.c:4893: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(new_str, term->value.blank.string, len + 1);
data/rasqal-0.9.33/src/rasqal_map.c:261: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.
static const char rasqal_map_node_spaces[SPACES_LENGTH+1]="                                                                                ";
data/rasqal-0.9.33/src/rasqal_query.c:344:37:  [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).
                                    atoi(RASQAL_GOOD_CAST(const char*, value)));
data/rasqal-0.9.33/src/rasqal_query.c:1256: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(query_string_copy, query_string, len - 3);
data/rasqal-0.9.33/src/rasqal_query_results.c:1264:11:  [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(nodeid, nodel->string, nodel->string_len + 1);
data/rasqal-0.9.33/src/rasqal_query_transform.c:2133: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.
static const char bit_label[9] = "spogSPOG";
data/rasqal-0.9.33/src/rasqal_query_transform.c:2163: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 label[14] = "             ";
data/rasqal-0.9.33/src/rasqal_query_transform.c:2738: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(inner_vars_scope, vars_scope, RASQAL_GOOD_CAST(size_t,
data/rasqal-0.9.33/src/rasqal_query_write.c:205: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.
static const char spaces[SPACES_LENGTH+1] = "                                                                                ";
data/rasqal-0.9.33/src/rasqal_raptor.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(mapped_id, rtsc->mapped_id_base, rtsc->mapped_id_base_len);
data/rasqal-0.9.33/src/rasqal_raptor.c:171: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(mapped_id + rtsc->mapped_id_base_len + 1,
data/rasqal-0.9.33/src/rasqal_regex.c:325: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(new_result, result, result_len);
data/rasqal-0.9.33/src/rasqal_regex.c:332:7:  [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(&result[result_len], subject_piece, piece_len);
data/rasqal-0.9.33/src/rasqal_regex.c:357:15:  [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(result_p, subject + match_start_offset, match_len);
data/rasqal-0.9.33/src/rasqal_regex.c:418: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(new_result, result, result_len);
data/rasqal-0.9.33/src/rasqal_regex.c:423:7:  [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(&result[result_len], subject_piece, piece_len);
data/rasqal-0.9.33/src/rasqal_regex.c:556: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(new_result, result, result_len);
data/rasqal-0.9.33/src/rasqal_regex.c:564: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(&result[result_len], subject_piece, piece_len);
data/rasqal-0.9.33/src/rasqal_regex.c:590:15:  [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(result_p, subject + rm.rm_so, match_len);
data/rasqal-0.9.33/src/rasqal_regex.c:638: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(new_result, result, result_len);
data/rasqal-0.9.33/src/rasqal_regex.c:643:7:  [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(&result[result_len], subject_piece, piece_len);
data/rasqal-0.9.33/src/rasqal_regex.c:746: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(pattern2 + 1, pattern, pattern_len);
data/rasqal-0.9.33/src/rasqal_results_compare.c:281: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 first_qr[4];
data/rasqal-0.9.33/src/rasqal_results_compare.c:282: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 second_qr[4];
data/rasqal-0.9.33/src/rasqal_results_compare.c:295:7:  [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(first_qr, "%2d", offset1);
data/rasqal-0.9.33/src/rasqal_results_compare.c:300:7:  [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(second_qr, "%2d", offset2);
data/rasqal-0.9.33/src/rasqal_row.c:462: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(val, str, str_len + 1);
data/rasqal-0.9.33/src/rasqal_row.c:617: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(nvalues, row->values, RASQAL_GOOD_CAST(size_t, sizeof(rasqal_literal*) * RASQAL_GOOD_CAST(size_t, row->size)));
data/rasqal-0.9.33/src/rasqal_row_compatible.c:183: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 left_rs[4];
data/rasqal-0.9.33/src/rasqal_row_compatible.c:184: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 right_rs[4];
data/rasqal-0.9.33/src/rasqal_row_compatible.c:197:7:  [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(left_rs, "%2d", offset1);
data/rasqal-0.9.33/src/rasqal_row_compatible.c:202:7:  [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(right_rs, "%2d", offset2);
data/rasqal-0.9.33/src/rasqal_rowsource.c:772: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.
static const char spaces[SPACES_LENGTH+1] = "                                                                                ";
data/rasqal-0.9.33/src/rasqal_rowsource.c:925:18:  [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).
        handle = fopen(RASQAL_GOOD_CAST(const char*, OUT_FILENAME), "wb");
data/rasqal-0.9.33/src/rasqal_rowsource_aggregation.c:159: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.
  unsigned char separator[2];
data/rasqal-0.9.33/src/rasqal_service.c:118: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(svc->query_string, query_string, len + 1);
data/rasqal-0.9.33/src/rasqal_service.c:246: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(svc->format, format, len + 1);
data/rasqal-0.9.33/src/rasqal_service.c:287: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(svc->content_type, content_type, len + 1);
data/rasqal-0.9.33/src/rasqal_variable.c:496: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(RASQAL_GOOD_CAST(char*, v->name), name, name_len + 1);
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:192: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.
static const char * const xsd_double_specials[XSD_DOUBLE_SPECIALS_LEN] = {
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:738: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 *double_valid_tests[N_VALID_TESTS+1] = {
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:751: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 *double_invalid_tests[N_INVALID_TESTS+1] = {
data/rasqal-0.9.33/src/sparql_lexer.c:2574:25:  [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(yylval->name, yytext + 1, yyleng - 1);
data/rasqal-0.9.33/src/sparql_lexer.c:4654: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.
  static char buffer[2048];
data/rasqal-0.9.33/src/sparql_lexer.c:5074:7:  [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(buffer, "INTEGER_LITERAL(%d)", lval->literal->value.integer);
data/rasqal-0.9.33/src/sparql_lexer.c:5080:7:  [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(buffer, "DOUBLE_LITERAL(%g)", lval->floating);
data/rasqal-0.9.33/src/sparql_lexer.c:5217: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).
  fh = fopen(filename, "r");
data/rasqal-0.9.33/src/sparql_lexer.c:5236: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(buf, query_string, len);
data/rasqal-0.9.33/src/sparql_parser.c:2056: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/rasqal-0.9.33/src/sparql_parser.c:3569: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 yymsgbuf[128];
data/rasqal-0.9.33/src/sparql_parser.c:10444: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 query_string[SPARQL_FILE_BUF_SIZE];
data/rasqal-0.9.33/src/sparql_parser.c:10521:7:  [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).
 fh = fopen(filename, "r");
data/rasqal-0.9.33/src/timegm.c:36: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(&my_tm, tm, sizeof(struct tm));
data/rasqal-0.9.33/src/timegm.c:60: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(zone_copy, zone, zone_len + 1); /* Copy NUL */
data/rasqal-0.9.33/tests/algebra/convert_graph_pattern.c:62: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.
static unsigned char buffer[FILE_READ_BUF_SIZE];
data/rasqal-0.9.33/tests/algebra/convert_graph_pattern.c:73: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).
  fh=fopen(filename, "r");
data/rasqal-0.9.33/tests/engine/rasqal_graph_test.c:171:55:  [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 unsigned char *query_string=(const unsigned char *)tests[i].query_string;
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:90: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.
  const char *expected_results[NQUERIES];
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:140:17:  [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).
    single_shot=atoi(argv[2]);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:166: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 lim[LIM_OFF_BUF_SIZE];
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:167: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 off[LIM_OFF_BUF_SIZE];
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:169:11:  [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(lim, "LIMIT %d", test->limit);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:173:11:  [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(off, "OFFSET %d", test->offset);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:232: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 expected_str[2]={0,0};
data/rasqal-0.9.33/utils/manifest.c:51: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.
static const char manifest_test_state_chars[STATE_LAST + 1] = {
data/rasqal-0.9.33/utils/manifest.c:508:7:  [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(test_name, str, size + 1);
data/rasqal-0.9.33/utils/manifest.c:523:7:  [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(test_desc, str, size + 1);
data/rasqal-0.9.33/utils/manifest.c:879:7:  [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(ts->desc, str, size + 1);
data/rasqal-0.9.33/utils/manifest.c:894:7:  [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(ts->path, str, size + 1);
data/rasqal-0.9.33/utils/read_files.c:137: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).
  fh = fopen(filename, "r");
data/rasqal-0.9.33/utils/roqet.c:182: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.
static const char spaces[SPACES_LENGTH + 1] = "                                                                                ";
data/rasqal-0.9.33/utils/roqet.c:923:23:  [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).
      store_results = atoi(sr);
data/rasqal-0.9.33/utils/roqet.c:1025:41:  [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).
                    query_feature_value=atoi(&optarg[len + 1]);
data/rasqal-0.9.33/utils/roqet.c:1168: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).
          warning_level = atoi(optarg);
data/rasqal-0.9.33/libsv/example.c:154: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).
  data_file_len = strlen(data_file);
data/rasqal-0.9.33/libsv/sv2c.c:187: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).
  data_file_len = strlen(data_file);
data/rasqal-0.9.33/libsv/svtest.c:219: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).
  data_len = strlen(test->data);
data/rasqal-0.9.33/src/rasqal_data_graph.c:73: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).
      size_t len = strlen(format_type);
data/rasqal-0.9.33/src/rasqal_data_graph.c:82: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).
      size_t len = strlen(format_name);
data/rasqal-0.9.33/src/rasqal_decimal.c:234: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(string);
data/rasqal-0.9.33/src/rasqal_decimal.c:431: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(s);
data/rasqal-0.9.33/src/rasqal_decimal.c:446: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(s);
data/rasqal-0.9.33/src/rasqal_expr_evaluate.c:682: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).
    size_t len = strlen(l1->language);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:78:41:  [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 = raptor_unicode_utf8_strlen(s, strlen(RASQAL_GOOD_CAST(const char*, s)));
data/rasqal-0.9.33/src/rasqal_expr_strings.c:163: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(RASQAL_GOOD_CAST(const char*, l1->language));
data/rasqal-0.9.33/src/rasqal_expr_strings.c:258: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(RASQAL_GOOD_CAST(const char*, l1->language));
data/rasqal-0.9.33/src/rasqal_expr_strings.c:619: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).
          size_t lang_len = strlen(arg_literal->language);
data/rasqal-0.9.33/src/rasqal_expr_strings.c:940: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).
      size_t len = strlen(RASQAL_GOOD_CAST(const char*, l1->language));
data/rasqal-0.9.33/src/rasqal_expr_strings.c:1059: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).
      size_t len = strlen(RASQAL_GOOD_CAST(const char*, l1->language));
data/rasqal-0.9.33/src/rasqal_format_html.c:90: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).
          raptor_xml_escape_string_write(str, strlen(l->language), '"', iostr);
data/rasqal-0.9.33/src/rasqal_format_html.c:142: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(RASQAL_GOOD_CAST(char*, name));
data/rasqal-0.9.33/src/rasqal_format_sparql_xml.c:757: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).
          size_t language_len = strlen(con->language);
data/rasqal-0.9.33/src/rasqal_format_table.c:119: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).
    w = strlen(RASQAL_GOOD_CAST(const char*, name));
data/rasqal-0.9.33/src/rasqal_format_table.c:210: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).
    w = strlen(RASQAL_GOOD_CAST(const char*, name));
data/rasqal-0.9.33/src/rasqal_format_table.c:233: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).
        size_t w = value ? strlen(RASQAL_GOOD_CAST(const char*, value)) : 0;
data/rasqal-0.9.33/src/rasqal_general.c:614: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).
  length=strlen(buffer);
data/rasqal-0.9.33/src/rasqal_general.c:916: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).
    length = strlen(prefix);
data/rasqal-0.9.33/src/rasqal_literal.c:371:51:  [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->string_len = RASQAL_BAD_CAST(unsigned int, strlen(RASQAL_GOOD_CAST(const char*, pattern)));
data/rasqal-0.9.33/src/rasqal_literal.c:620:51:  [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->string_len = RASQAL_BAD_CAST(unsigned int, strlen(RASQAL_GOOD_CAST(const char*, string)));
data/rasqal-0.9.33/src/rasqal_literal.c:910:51:  [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->string_len = RASQAL_BAD_CAST(unsigned int, strlen(RASQAL_GOOD_CAST(const char*, string)));
data/rasqal-0.9.33/src/rasqal_literal.c:913:25:  [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_t lang_len = strlen(language);
data/rasqal-0.9.33/src/rasqal_literal.c:1045:51:  [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->string_len = RASQAL_BAD_CAST(unsigned int, strlen(RASQAL_GOOD_CAST(const char*, string)));
data/rasqal-0.9.33/src/rasqal_literal.c:3012: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).
                                       strlen(RASQAL_GOOD_CAST(const char*, l->flags)));
data/rasqal-0.9.33/src/rasqal_literal.c:4783: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).
        size_t str_len = strlen(str);
data/rasqal-0.9.33/src/rasqal_ntriples.c:804: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).
    length = strlen(RASQAL_GOOD_CAST(const char*, string));
data/rasqal-0.9.33/src/rasqal_query.c:1250: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).
    size_t len = strlen(RASQAL_GOOD_CAST(const char*, query_string)) + 3; /* +3 for " \0\0" */
data/rasqal-0.9.33/src/rasqal_query_results.c:290: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).
    string_len = strlen(string);
data/rasqal-0.9.33/src/rasqal_query_results.c:1221: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).
  size_t length = strlen(RASQAL_GOOD_CAST(const char*, string)) + 4;  /* "r" +... + "q" +... \0 */
data/rasqal-0.9.33/src/rasqal_query_test.c:99: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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen(RASQAL_GOOD_CAST(const char*, data_string)) + strlen(query_format) + 1);
data/rasqal-0.9.33/src/rasqal_query_test.c:99:101:  [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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen(RASQAL_GOOD_CAST(const char*, data_string)) + strlen(query_format) + 1);
data/rasqal-0.9.33/src/rasqal_raptor.c:141: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).
  length = strlen(RASQAL_GOOD_CAST(const char*, base)) + 2;  /* base + (int) + "\0" */
data/rasqal-0.9.33/src/rasqal_raptor.c:165: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).
    size_t user_bnodeid_len = strlen(RASQAL_GOOD_CAST(const char*, user_bnodeid));
data/rasqal-0.9.33/src/rasqal_raptor.c:271:32:  [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).
    rtsc->mapped_id_base_len = strlen(RASQAL_GOOD_CAST(const char*, rtsc->mapped_id_base));
data/rasqal-0.9.33/src/rasqal_regex.c:740: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).
  pattern_len = strlen(pattern);
data/rasqal-0.9.33/src/rasqal_regex.c:823: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).
    size_t subject_len = strlen(RASQAL_GOOD_CAST(const char*, subject));
data/rasqal-0.9.33/src/rasqal_regex.c:824: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).
    size_t replace_len = strlen(RASQAL_GOOD_CAST(const char*, replace));
data/rasqal-0.9.33/src/rasqal_result_formats.c:688: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).
      suffix = RASQAL_MALLOC(unsigned char*, strlen(RASQAL_GOOD_CAST(const char*, p)) + 1);
data/rasqal-0.9.33/src/rasqal_results_compare.c:567:9:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    int equal;
data/rasqal-0.9.33/src/rasqal_results_compare.c:601:76:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      RASQAL_DEBUG4("%s: equal results test %d returned %d\n", program, i, equal);
data/rasqal-0.9.33/src/rasqal_results_compare.c:602:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if(equal != expected_equality) {
data/rasqal-0.9.33/src/rasqal_results_compare.c:605:29:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                program, i, equal, expected_equality);
data/rasqal-0.9.33/src/rasqal_row.c:405: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).
    size_t var_name_len = strlen(var_name);
data/rasqal-0.9.33/src/rasqal_row.c:448: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).
        size_t str_len = strlen(str);
data/rasqal-0.9.33/src/rasqal_rowsource.c:795: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).
  indent_delta = RASQAL_GOOD_CAST(unsigned int, strlen(rs_name));
data/rasqal-0.9.33/src/rasqal_rowsource_triples.c:502: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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen(RASQAL_GOOD_CAST(const char*, data_string)) + strlen(query_format) + 1);
data/rasqal-0.9.33/src/rasqal_rowsource_triples.c:502:101:  [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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen(RASQAL_GOOD_CAST(const char*, data_string)) + strlen(query_format) + 1);
data/rasqal-0.9.33/src/rasqal_service.c:111: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(RASQAL_GOOD_CAST(const char*, query_string));
data/rasqal-0.9.33/src/rasqal_service.c:241: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(format);
data/rasqal-0.9.33/src/rasqal_service.c:281: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(content_type);
data/rasqal-0.9.33/src/rasqal_variable.c:477: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).
    name_len = strlen(RASQAL_GOOD_CAST(const char*, name));
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:367: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).
    *len_p = strlen(RASQAL_GOOD_CAST(const char*, string));
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:396: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).
    *len_p = strlen(RASQAL_GOOD_CAST(const char*, string));
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:462: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(RASQAL_GOOD_CAST(const char*, buf));
data/rasqal-0.9.33/src/rasqal_xsd_datatypes.c:471: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).
      len = strlen(RASQAL_GOOD_CAST(const char*, buf));
data/rasqal-0.9.33/src/sparql_lexer.c:1662:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/rasqal-0.9.33/src/sparql_lexer.c:3711: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).
	return sparql_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner);
data/rasqal-0.9.33/src/sparql_lexer.c:5234: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).
  len =  strlen(RASQAL_GOOD_CAST(const char*, query_string));
data/rasqal-0.9.33/src/sparql_parser.c:1956: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).
#   define yystrlen strlen
data/rasqal-0.9.33/src/sparql_parser.c:3963: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).
    prefix_length = strlen(RASQAL_GOOD_CAST(const char*, prefix_string));
data/rasqal-0.9.33/src/timegm.c:55:23:  [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_t zone_len = strlen(zone);
data/rasqal-0.9.33/tests/engine/rasqal_construct_test.c:113: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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_dir_string) + strlen(data_file) + strlen(query_format) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_construct_test.c:113:87:  [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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_dir_string) + strlen(data_file) + strlen(query_format) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_construct_test.c:113:107:  [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).
  query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_dir_string) + strlen(data_file) + strlen(query_format) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:163: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).
      query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_string) + strlen(query_format) + (2 * LIM_OFF_BUF_SIZE) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:163:87:  [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).
      query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_string) + strlen(query_format) + (2 * LIM_OFF_BUF_SIZE) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_limit_test.c:243: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).
            size_t len=strlen(str);
data/rasqal-0.9.33/tests/engine/rasqal_order_test.c:120:50:  [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).
    query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_dir_string) + strlen(animals) + strlen(query_format) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_order_test.c:120:89:  [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).
    query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_dir_string) + strlen(animals) + strlen(query_format) + 1);
data/rasqal-0.9.33/tests/engine/rasqal_order_test.c:120:107:  [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).
    query_string = RASQAL_MALLOC(unsigned char*, strlen((const char*)data_dir_string) + strlen(animals) + strlen(query_format) + 1);
data/rasqal-0.9.33/utils/manifest.c:1132: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).
                strlen((const char*)query_string), ql_name,
data/rasqal-0.9.33/utils/roqet.c:659: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).
    size_t len = strlen((const char*)query_string);
data/rasqal-0.9.33/utils/roqet.c:1009: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).
            size_t arg_len = strlen(optarg);
data/rasqal-0.9.33/utils/roqet.c:1019: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).
              len = strlen(feature_name);

ANALYSIS SUMMARY:

Hits = 321
Lines analyzed = 83991 in approximately 2.06 seconds (40832 lines/second)
Physical Source Lines of Code (SLOC) = 55639
Hits@level = [0] 684 [1]  79 [2] 170 [3]  26 [4]  46 [5]   0
Hits@level+ = [0+] 1005 [1+] 321 [2+] 242 [3+]  72 [4+]  46 [5+]   0
Hits/KSLOC@level+ = [0+] 18.0629 [1+] 5.76933 [2+] 4.34947 [3+] 1.29406 [4+] 0.826758 [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.