~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to src/lib/krb5/os/dnsglue.c

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 
2
/* lib/krb5/os/dnsglue.c */
2
3
/*
3
 
 * lib/krb5/os/dnsglue.c
4
 
 *
5
4
 * Copyright 2004, 2009 by the Massachusetts Institute of Technology.
6
5
 * All Rights Reserved.
7
6
 *
23
22
 * M.I.T. makes no representations about the suitability of
24
23
 * this software for any purpose.  It is provided "as is" without express
25
24
 * or implied warranty.
26
 
 *
27
25
 */
 
26
 
28
27
#include "autoconf.h"
29
28
#ifdef KRB5_DNS_LOOKUP
30
29
 
185
184
        if (len < 0)
186
185
            return -1;
187
186
        ds->cur_ans++;
188
 
        if (ds->nclass == ns_rr_class(rr)
189
 
            && ds->ntype == ns_rr_type(rr)) {
 
187
        if (ds->nclass == (int)ns_rr_class(rr)
 
188
            && ds->ntype == (int)ns_rr_type(rr)) {
190
189
            *pp = ns_rr_rdata(rr);
191
190
            *lenp = ns_rr_rdlen(rr);
192
191
            return 0;