Project

General

Profile

Bug #11127

libsip: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../common/sip_uri_ui.c: In function 'sip_get_uri_port':
    ../common/sip_uri_ui.c:239:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^

    ../common/sip_parse_generic.c: In function 'sip_find_separator':
    ../common/sip_parse_generic.c:120:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (separator_1st != (char)NULL &&
                             ^
    ../common/sip_parse_generic.c:122:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (separator_2nd != (char)NULL &&
                             ^
    ../common/sip_parse_generic.c:124:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (separator_3rd != (char)NULL &&
                             ^
    ../common/sip_parse_generic.c: In function 'sip_parse_params':
    ../common/sip_parse_generic.c:323:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL, B_FALSE) != 0) {
           ^
    ../common/sip_parse_generic.c: In function 'sip_parse_hdr_parser1':
    ../common/sip_parse_generic.c:538:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        if (isspace(c) && sep == (char)NULL) {
                                 ^
    ../common/sip_parse_generic.c:574:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        if ((sep != (char)NULL) && (c == sep)) {
                    ^
    ../common/sip_parse_generic.c:582:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
             (char)NULL, B_FALSE) == 0) {
             ^
    ../common/sip_parse_generic.c:601:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        } else if (sep != (char)NULL) {
                          ^
    ../common/sip_parse_generic.c: In function 'sip_parse_hdr_parser3':
    ../common/sip_parse_generic.c:830:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
             (char)NULL, (char)NULL, B_FALSE) != 0) {
             ^
    ../common/sip_parse_generic.c:830:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
             (char)NULL, (char)NULL, B_FALSE) != 0) {
                         ^
    ../common/sip_parse_generic.c:888:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       r = sip_find_separator(hdr, SIP_COMMA, SIP_SEMI, (char)NULL,
                                                        ^
    ../common/sip_parse_generic.c: In function 'sip_parse_hdr_parser5':
    ../common/sip_parse_generic.c:1046:53: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       if (sip_find_separator(hdr, SIP_EQUAL, SIP_COMMA, (char)NULL,
                                                         ^

    ../common/sip_headers.c: In function '_sip_get_header_functions':
    ../common/sip_headers.c:730:50: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       if (sip_find_separator(sip_header, SIP_HCOLON, (char)NULL,
                                                      ^
    ../common/sip_headers.c:731:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL, B_FALSE) != 0) {
           ^

    ../common/sip_xaction_ui.c: In function 'sip_get_trans_state':
    ../common/sip_xaction_ui.c:206:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^

    ../common/sip_parse_hdrs.c: In function 'sip_parse_acpt_encode_header':
    ../common/sip_parse_hdrs.c:68:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_acpt_lang_header':
    ../common/sip_parse_hdrs.c:82:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_allow_header':
    ../common/sip_parse_hdrs.c:135:42: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       if (sip_find_separator(hdr, SIP_COMMA, (char)NULL,
                                              ^
    ../common/sip_parse_hdrs.c:136:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL, B_FALSE) == 0) {
           ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_contentdis_header':
    ../common/sip_parse_hdrs.c:199:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_contentencode_header':
    ../common/sip_parse_hdrs.c:210:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_contentlang_header':
    ../common/sip_parse_hdrs.c:224:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_inreplyto_header':
    ../common/sip_parse_hdrs.c:358:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_privacy_header':
    ../common/sip_parse_hdrs.c:452:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_require_header':
    ../common/sip_parse_hdrs.c:463:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_support_header':
    ../common/sip_parse_hdrs.c:573:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_usupport_header':
    ../common/sip_parse_hdrs.c:657:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_allow_events_header':
    ../common/sip_parse_hdrs.c:880:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_event_header':
    ../common/sip_parse_hdrs.c:896:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_substate_header':
    ../common/sip_parse_hdrs.c:922:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_ainfo_header':
    ../common/sip_parse_hdrs.c:975:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_preq_header':
    ../common/sip_parse_hdrs.c:1029:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      return (sip_parse_hdr_parser1(sip_header, header, (char)NULL));
                                                        ^
    ../common/sip_parse_hdrs.c: In function 'sip_parse_cftr_header':
    ../common/sip_parse_hdrs.c:1584:50: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       if (sip_find_separator(sip_header, SIP_RAQUOT, (char)NULL,
                                                      ^
    ../common/sip_parse_hdrs.c:1585:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL, B_FALSE)) {
           ^

    ../common/sip_add_hdrs.c: In function 'sip_add_allow':
    ../common/sip_add_hdrs.c:583:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          NULL, (char)NULL);
                ^
    ../common/sip_add_hdrs.c: In function 'sip_add_content_enc':
    ../common/sip_add_hdrs.c:650:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_content_lang':
    ../common/sip_add_hdrs.c:669:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_date':
    ../common/sip_add_hdrs.c:694:58: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      ret = sip_add_str_to_msg(sip_msg, SIP_DATE, date, NULL, (char)NULL);
                                                              ^
    ../common/sip_add_hdrs.c: In function 'sip_add_in_reply_to':
    ../common/sip_add_hdrs.c:749:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_mime_version':
    ../common/sip_add_hdrs.c:792:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_org':
    ../common/sip_add_hdrs.c:808:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL);
           ^
    ../common/sip_add_hdrs.c: In function 'sip_add_priority':
    ../common/sip_add_hdrs.c:826:62: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      ret = sip_add_str_to_msg(sip_msg, SIP_PRIORITY, prio, NULL, (char)NULL);
                                                                  ^
    ../common/sip_add_hdrs.c: In function 'sip_add_privacy':
    ../common/sip_add_hdrs.c:859:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_require':
    ../common/sip_add_hdrs.c:874:60: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      ret = sip_add_str_to_msg(sip_msg, SIP_REQUIRE, req, NULL, (char)NULL);
                                                                ^
    ../common/sip_add_hdrs.c: In function 'sip_add_server':
    ../common/sip_add_hdrs.c:914:59: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      ret = sip_add_str_to_msg(sip_msg, SIP_SERVER, svr, NULL, (char)NULL);
                                                               ^
    ../common/sip_add_hdrs.c: In function 'sip_add_subject':
    ../common/sip_add_hdrs.c:930:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL);
           ^
    ../common/sip_add_hdrs.c: In function 'sip_add_supported':
    ../common/sip_add_hdrs.c:948:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL);
           ^
    ../common/sip_add_hdrs.c: In function 'sip_add_tstamp':
    ../common/sip_add_hdrs.c:965:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
           (char)NULL);
           ^
    ../common/sip_add_hdrs.c: In function 'sip_add_unsupported':
    ../common/sip_add_hdrs.c:984:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_user_agent':
    ../common/sip_add_hdrs.c:998:61: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      r = sip_add_str_to_msg(sip_msg, SIP_USER_AGENT, usr, NULL, (char)NULL);
                                                                 ^
    ../common/sip_add_hdrs.c: In function 'sip_add_allow_events':
    ../common/sip_add_hdrs.c:1111:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL));
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_authen_info':
    ../common/sip_add_hdrs.c:1205:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL));
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_proxy_require':
    ../common/sip_add_hdrs.c:1258:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL));
          ^
    ../common/sip_add_hdrs.c: In function 'sip_add_callid':
    ../common/sip_add_hdrs.c:1293:6: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          (char)NULL);
          ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 4 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 559f8b540657be5e8d59b0b7017058a7ac6ba4bb

commit  559f8b540657be5e8d59b0b7017058a7ac6ba4bb
Author: Toomas Soome <tsoome@me.com>
Date:   2019-06-24T19:08:20.000Z

    11127 libsip: NULL pointer errors
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF