/[winpt]/trunk/Src/wptKeylist.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeylist.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 49 by werner, Mon Oct 31 21:14:11 2005 UTC revision 50 by twoaday, Wed Nov 2 08:32:55 2005 UTC
# Line 368  get_key_trust_str (int val) Line 368  get_key_trust_str (int val)
368  }  }
369    
370    
371    /* Return the status of the key @key. */
372  char*  char*
373  get_key_status (gpgme_key_t key, int uididx, int listmode)  get_key_status (gpgme_key_t key, int uididx, int listmode)
374  {  {
375      gpgme_user_id_t u;      gpgme_user_id_t u;
376      char * p;      const char *attr;
     const char * attr;  
377      int i = 0;      int i = 0;
378      u32 key_attr =0;      u32 key_attr =0;
379    
# Line 399  get_key_status (gpgme_key_t key, int uid Line 399  get_key_status (gpgme_key_t key, int uid
399      u = get_nth_userid (key, uididx);      u = get_nth_userid (key, uididx);
400      key_attr = u->validity;      key_attr = u->validity;
401      attr = get_key_trust2 (NULL, key_attr, 0, 0);      attr = get_key_trust2 (NULL, key_attr, 0, 0);
402      /* FIXME: Why not just strdup and why does this function either      return m_strdup (attr);
403       * return a new allocated or an m_strdup allocated string?  This  }
      * is very dangerous!!! */  
     p = new char[strlen( attr ) + 2];  
     if (!p)  
         BUG (NULL);  
     strcpy (p, attr);  
     return p;  
 } /* get_key_status */  
404    
405    
406  /* Integer comparsion of @a and @b.  /* Integer comparsion of @a and @b.

Legend:
Removed from v.49  
changed lines
  Added in v.50

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26