libsoup-2.62.2-1.5.fc29

# libsoup-2.62.2-1.5.fc29 - after patches for GNOME bug #781771

## List of Defects

    Error: CLANG_WARNING: [#def1]
    libsoup-2.62.2/libsoup/soup-address.c:205:23: warning: The left operand of '==' is a garbage value
    #                priv->port = ntohs (SOUP_ADDRESS_GET_PORT (priv));
    #                                    ^
    libsoup-2.62.2/libsoup/soup-address.c:77:29: note: expanded from macro 'SOUP_ADDRESS_GET_PORT'
    #        (priv->sockaddr->ss_family == AF_INET ? \
    #                                   ^
    libsoup-2.62.2/libsoup/soup-address.c:163:2: note: Control jumps to 'case PROP_SOCKADDR:'  at line 196
    #        switch (prop_id) {
    #        ^
    libsoup-2.62.2/libsoup/soup-address.c:198:7: note: Assuming 'sa' is non-null
    #                if (!sa)
    #                    ^~~
    libsoup-2.62.2/libsoup/soup-address.c:198:3: note: Taking false branch
    #                if (!sa)
    #                ^
    libsoup-2.62.2/libsoup/soup-address.c:203:20: note: Uninitialized value stored to field 'ss_family'
    #                priv->sockaddr = g_memdup (sa, len);
    #                                 ^~~~~~~~~~~~~~~~~~
    libsoup-2.62.2/libsoup/soup-address.c:205:23: note: The left operand of '==' is a garbage value
    #                priv->port = ntohs (SOUP_ADDRESS_GET_PORT (priv));
    #                             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    libsoup-2.62.2/libsoup/soup-address.c:77:29: note: expanded from macro 'SOUP_ADDRESS_GET_PORT'
    #        (priv->sockaddr->ss_family == AF_INET ? \
    #                                   ^
    /usr/include/netinet/in.h:402:33: note: expanded from macro 'ntohs'
    ##   define ntohs(x)     __bswap_16 (x)
    #                                    ^
    #  203|   		priv->sockaddr = g_memdup (sa, len);
    #  204|   		priv->n_addrs = 1;
    #  205|-> 		priv->port = ntohs (SOUP_ADDRESS_GET_PORT (priv));
    #  206|   		break;
    #  207|   	default:

    Error: DEADCODE (CWE-561): [#def2]
    libsoup-2.62.2/libsoup/soup-date.c:572: cond_const: Condition "format == SOUP_DATE_COOKIE", taking true branch. Now the value of "format" is equal to 2.
    libsoup-2.62.2/libsoup/soup-date.c:572: cond_const: Condition "format == SOUP_DATE_HTTP", taking true branch. Now the value of "format" is equal to 1.
    libsoup-2.62.2/libsoup/soup-date.c:587: between: When switching on "format", the value of "format" must be between 1 and 2.
    libsoup-2.62.2/libsoup/soup-date.c:587: dead_error_condition: The "switch" governing value "format" cannot reach the "default" case.
    libsoup-2.62.2/libsoup/soup-date.c:604: dead_error_begin: Execution cannot reach this statement: "default:".
    #  602|   				date->hour, date->minute, date->second);
    #  603|
    #  604|-> 		default:
    #  605|   			g_return_val_if_reached (NULL);
    #  606|   		}

    Error: TAINTED_SCALAR (CWE-20): [#def3]
    libsoup-2.62.2/examples/get.c:222: var_assign_var: Assigning: "url" = "argv[1]". Both are now tainted.
    libsoup-2.62.2/examples/get.c:223: tainted_data: Passing tainted variable "*url" to a tainted sink.
    libsoup-2.62.2/libsoup/soup-uri.c:519:2: data_index: Passing tainted variable "*uri_string" to a tainted data index sink.
    libsoup-2.62.2/libsoup/soup-uri.c:261:2: data_index: Using tainted variable "(guchar)*uri_string" as an index to pointer "g_ascii_table".
    #  259|   	 * line breaks, and ignore trailing whitespace.
    #  260|   	 */
    #  261|-> 	while (g_ascii_isspace (*uri_string))
    #  262|   		uri_string++;
    #  263|

    Error: TAINTED_SCALAR (CWE-20): [#def4]
    libsoup-2.62.2/examples/get.c:222: var_assign_var: Assigning: "url" = "argv[1]". Both are now tainted.
    libsoup-2.62.2/examples/get.c:223: tainted_data: Passing tainted variable "url" to a tainted sink.
    libsoup-2.62.2/libsoup/soup-uri.c:519:2: data_index: Passing tainted variable "uri_string" to a tainted data index sink.
    libsoup-2.62.2/libsoup/soup-uri.c:294:2: parm_assign_alias: Assigning: "p" = "uri_string", which taints "p".
    libsoup-2.62.2/libsoup/soup-uri.c:295:2: data_index: Using tainted variable "(guchar)*p" as an index to pointer "g_ascii_table".
    #  293|   	/* Find scheme */
    #  294|   	p = uri_string;
    #  295|-> 	while (p < end && (g_ascii_isalpha (*p) ||
    #  296|   			   (p > uri_string && (g_ascii_isdigit (*p) ||
    #  297|   					       *p == '.' ||

    Error: CONSTANT_EXPRESSION_RESULT (CWE-398): [#def5]
    libsoup-2.62.2/libsoup/soup-xmlrpc.c:890: result_independent_of_operands: "num < -9223372036854775808L /* (gint64)-9223372036854775808UL */" is always false regardless of the values of its operands. This occurs as the logical first operand of "||".
    #  888|   		break;
    #  889|   	case G_VARIANT_CLASS_INT64:
    #  890|-> 		RANGE (num, G_MININT64, G_MAXINT64);
    #  891|   		variant = g_variant_new_int64 (num);
    #  892|   		break;

    Error: NO_EFFECT (CWE-398): [#def6]
    libsoup-2.62.2/libsoup/soup-xmlrpc.c:894: unsigned_compare: This less-than-zero comparison of an unsigned value is never true. "unum < 0UL".
    #  892|   		break;
    #  893|   	case G_VARIANT_CLASS_UINT64:
    #  894|-> 		RANGE (unum, 0, G_MAXUINT64);
    #  895|   		variant = g_variant_new_uint64 (unum);
    #  896|   		break;

    Error: INFINITE_LOOP (CWE-835): [#def7]
    libsoup-2.62.2/tests/test-utils.c:465: loop_top: Top of the loop.
    libsoup-2.62.2/tests/test-utils.c:466: loop_bottom: Bottom of the loop.
    libsoup-2.62.2/tests/test-utils.c:465: loop_condition: If "data.uri" is initially true then it will remain true.
    #  463|   		soup_add_completion (context, add_listener_in_thread, &data);
    #  464|
    #  465|-> 		while (!data.uri)
    #  466|   			g_cond_wait (&data.cond, &data.mutex);
    #  467|

    Error: INFINITE_LOOP (CWE-835): [#def8]
    libsoup-2.62.2/tests/test-utils.c:501: loop_top: Top of the loop.
    libsoup-2.62.2/tests/test-utils.c:502: loop_bottom: Bottom of the loop.
    libsoup-2.62.2/tests/test-utils.c:501: loop_condition: If "done" is initially true then it will remain true.
    #  499|
    #  500|   	soup_server_disconnect (server);
    #  501|-> 	while (!done)
    #  502|   		g_main_context_iteration (context, TRUE);
    #  503|   }

    Error: FORWARD_NULL (CWE-476): [#def9]
    libsoup-2.62.2/win32/pc_base.py:30: assign_undefined: Assigning: "input_exec_prefix" = "undefined".
    libsoup-2.62.2/win32/pc_base.py:85: invalid_operation: Invalid operation on null-like value "input_exec_prefix".
    #   83|                   if args.includedir.startswith('${exec_prefix}'):
    #   84|                       includedir_use_shorthand = True
    #   85|->                     input_includedir = input_exec_prefix + args.includedir[len('${exec_prefix}'):]
    #   86|                   else:
    #   87|                       includedir_use_shorthand = False

    Error: FORWARD_NULL (CWE-476): [#def10]
    libsoup-2.62.2/win32/pc_base.py:30: assign_undefined: Assigning: "input_exec_prefix" = "undefined".
    libsoup-2.62.2/win32/pc_base.py:107: invalid_operation: Invalid operation on null-like value "input_exec_prefix".
    #  105|                   if args.libdir.startswith('${exec_prefix}'):
    #  106|                       libdir_use_shorthand = True
    #  107|->                     input_libdir = input_exec_prefix + args.libdir[len('${exec_prefix}'):]
    #  108|                   else:
    #  109|                       libdir_use_shorthand = False