Project

General

Profile

Bug #11163

mech_krb5: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 3 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:

    ../krb5/krb/vfy_increds.c: In function 'krb5_cc_copy_creds_except':
    ../krb5/krb/vfy_increds.c:22:57: error: comparison between pointer and integer [-Werror]
        if ((code = krb5_cc_set_flags(context, incc, flags)) != NULL)
                                                             ^~
    ../krb5/krb/vfy_increds.c:25:58: error: comparison between pointer and integer [-Werror]
        if ((code = krb5_cc_set_flags(context, outcc, flags)) != NULL)
                                                              ^~
    ../krb5/krb/vfy_increds.c:29:60: error: comparison between pointer and integer [-Werror]
        if ((code = krb5_cc_start_seq_get(context, incc, &cur)) != NULL)
                                                                ^~
    ../krb5/krb/vfy_increds.c:33:67: error: comparison between pointer and integer [-Werror]
        while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == NULL) {
                                                                       ^~
    ../krb5/krb/vfy_increds.c: In function 'krb5_verify_init_creds':
    ../krb5/krb/vfy_increds.c:168:70: error: comparison between pointer and integer [-Werror]
           if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != NULL)
                                                                          ^~
    ../krb5/krb/vfy_increds.c:172:62: error: comparison between pointer and integer [-Werror]
           if ((ret = krb5_cc_store_cred(context, ccache, creds)) != NULL)
                                                                  ^~
    ../krb5/krb/vfy_increds.c:215:69: error: comparison between pointer and integer [-Werror]
         if (((ret = krb5_cc_resolve(context, "MEMORY:rd_req2", &retcc)) != NULL) ||
                                                                         ^~
    ../krb5/krb/vfy_increds.c:216:68: error: comparison between pointer and integer [-Werror]
             ((ret = krb5_cc_initialize(context, retcc, creds->client)) != NULL) ||
                                                                        ^~
    ../krb5/krb/vfy_increds.c:218:23: error: comparison between pointer and integer [-Werror]
           creds->server)) != NULL)) {
                           ^~

    ../krb5/krb/gic_keytab.c: In function 'krb5_get_as_key_keytab':
    ../krb5/krb/gic_keytab.c:75:23: error: comparison between pointer and integer [-Werror]
          etype, &kt_ent)) != NULL)
                           ^~

    ../krb5/keytab/kt_solaris.c: In function 'krb5_kt_add_ad_entries':
    ../krb5/keytab/kt_solaris.c:216:29: error: comparison between pointer and integer [-Werror]
      if (code != 0 || *enctypes == NULL)
                                 ^~
    ../krb5/keytab/kt_solaris.c: In function 'krb5_kt_ad_validate':
    ../krb5/keytab/kt_solaris.c:444:29: error: comparison between pointer and integer [-Werror]
      if (code != 0 || *enctypes == NULL)
                                 ^~

    /code/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/acquire_cred_with_pw.c: In function 'acquire_init_cred_with_pw':
    /code/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/acquire_cred_with_pw.c:127:43: error: comparison between pointer and integer [-Werror]
      if (password == NULL || password->length == NULL ||
                                               ^~
    ../crypto/des/afsstring2key.c: In function 'mit_afs_crypt':
    ../crypto/des/afsstring2key.c:385:21: error: comparison between pointer and integer [-Werror]
      for(i=0; ((c= *pw) != NULL) && i<64; pw++){
                         ^~

    ../profile/prof_solaris.c: In function '__profile_validate':
    ../profile/prof_solaris.c:815:22: error: comparison between pointer and integer [-Werror]
       while ((c = *tr++) != NULL) {
                          ^~
    ../profile/prof_solaris.c:835:23: error: comparison between pointer and integer [-Werror]
        while ((c = *tr++) != NULL) {
                           ^~

    /code/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/init_sec_context.c:1684:59: error: comparison between pointer and integer [-Werror]
      if (((major = kg_get_defcred(minor_status, cred_handle)) != NULL) &&
                                                               ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 3 months ago

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

git commit 940daf74cfd1719bd901f346ef96e7a7e24f3d5f

commit  940daf74cfd1719bd901f346ef96e7a7e24f3d5f
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-03T07:46:42.000Z

    11163 mech_krb5: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF